What does it do?
using System;
using System.Collections.Generic;
class Test{
delegate void Printer();
static void Main() {
List
for (int i=0; i <>
{
printers.Add(delegate { Console.WriteLine(i); } );
}
foreach (Printer printer in printers)
{
printer();
}
}
}
1 comment:
Sorry but that code won't compile. You are using List in a non-generic way.
Post a Comment