hi i have a code that i dont understand what should be his ouput.
here is the code:
delegate void Employee();
static void Main()
{
IList employees= new List<Employee>();
for(int i=0;i<3;i++)
{
employee.Add( () => Console.Write(i));
}
foreach(var employee in employees)
{
employee();
}
}
can anyone help me with this? what is the output and how did you found it?