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

            empList.Add(new Emplyee()
            {
                Id = 101, Name = "Mark", Salary = 10000, Experience = 5
            });
            empList.Add(new Emplyee()
            {
                Id = 102, Name = "Mary", Salary = 10000, Experience = 4
            });
            empList.Add(new Emplyee()
            {
                Id = 103, Name = "Dom", Salary = 10000, Experience = 6
            });
            empList.Add(new Emplyee()
            {
                Id = 104, Name = "Piter", Salary = 10000, Experience = 4
            });
            empList.Add(new Emplyee()
            {
                Id = 105, Name = "Jerry", Salary = 10000, Experience = 5
            });

            Ispromoted ip = new Ispromoted(Promote);

            Emplyee.PromoteEmplyee(empList, ip);
        }
Example #2
0
 public static bool Promote(Emplyee emp)
 {
     if (emp.Experience >= 5)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }