-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
45 lines (37 loc) · 1.53 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Text;
namespace BethanyPieShopHRM
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Creating an employee");
Console.WriteLine("--------------------\n");
Employee bethany = new Employee("Bethany", "Smith", "[email protected]", new DateTime (1979, 02, 26),
EmployeeType.Manager, 25);
Employee george = new Employee("George", "Jones", "[email protected]", new DateTime(1984, 10, 05),
EmployeeType.Research, 30);
////understanding how values passed by reference in an obj
// Employee testEmployee = bethany;
////I created a new variable, that apoint to the same employee, the same obj in the memory!
//// So there are 2 employee references that point to the same object
// testEmployee.firstName = "Gill";
// bethany.DisplayEmployeeDetais();
////-----------------------------------
bethany.DisplayEmployeeDetais();
bethany.PerfomWork();
bethany.PerfomWork();
bethany.PerfomWork();
bethany.ReceiveWage();
Console.WriteLine("\n\nCreating an employee");
Console.WriteLine("--------------------\n");
george.DisplayEmployeeDetais();
george.PerfomWork();
george.PerfomWork();
george.PerfomWork();
george.ReceiveWage();
Console.ReadLine();
}
}
}