using System.Collections.Generic;
public delegate bool IsPromoted(Employee emplo);
public static void Main()
List<Employee> EmpList=new List<Employee>();
EmpList.Add(new Employee() {ID=100,Name="Preeti",Sal=100000,Exper=5});
EmpList.Add(new Employee() {ID=101,Name="Sally",Sal=60000,Exper=1});
EmpList.Add(new Employee(){ID=102,Name="Dhruv",Sal=90000,Exper=9});
EmpList.Add(new Employee() {ID=103,Name="Meena",Sal=70000,Exper=0});
IsPromoted pm=new IsPromoted(Promote);
Employee.PromoteEmp(EmpList,pm);
public static bool Promote(Employee empl)
public string Name{get; set;}
public int Sal{get; set;}
public int Exper{get; set;}
public static void PromoteEmp(List<Employee> EmpList,IsPromoted IsEligible)
foreach(Employee e in EmpList)
Console.WriteLine(e.Name + " is promoted");