static void Main(string[] args) { EmployeeManager manager = new EmployeeManager(); manager.Add(new Employee() { Name = "Shlomo", Salary = 7000 }); manager.Add(new Employee() { Name = "Noam", Salary = 17000 }); manager.Add(new Employee() { Name = "Yossi", Salary = 5000 }); manager.Add(new Employee() { Name = "Tomer", Salary = 2000 }); manager.Print(); EmployeeManager.isGreater greaterAction = Employee.isGreaterByName; manager.generalSort(greaterAction); manager.Print(); EmployeeManager.isGreater greaterAction2 = Employee.isGreaterBySalary; manager.generalSort(greaterAction2); manager.Print(); }
static void Main(string[] args) { EmployeeManager manager = new EmployeeManager(); manager.Add(new Employee() { Name = "Shlomo", Salary = 7000 }); manager.Add(new Employee() { Name = "Noam", Salary = 17000 }); manager.Add(new Employee() { Name = "Yossi", Salary = 5000 }); manager.Add(new Employee() { Name = "Tomer", Salary = 2000 }); manager.Print(); }