Example #1
0
        static void Main(string[] args)
        {
            List <Employee> empList = new List <Employee>();

            empList.Add(new Employee {
                id = 101, name = "Ujjwal", salary = 50000, experience = 1
            });
            empList.Add(new Employee {
                id = 102, name = "Swati", salary = 60000, experience = 2
            });
            empList.Add(new Employee {
                id = 103, name = "Niki", salary = 50000, experience = 3
            });
            empList.Add(new Employee {
                id = 104, name = "Bharti", salary = 60000, experience = 4
            });

            IsPromotable isHe = new IsPromotable(Promote);

            Employee.PromoteEmployee(empList, isHe);

            Console.ReadKey();
        }