5 public delegate void TestDelegate ();
7 static long sum_i, sum_k;
9 public static int Test ()
11 TestDelegate d = null;
12 for (int i = 1; i <= 5; i++) {
14 TestDelegate temp = delegate {
15 Console.WriteLine ("i = {0}, k = {1}", i, k);
22 Console.WriteLine ("SUM i = {0}, k = {1}", sum_i, sum_k);
30 Console.WriteLine ("SUM i = {0}, k = {1}", sum_i, sum_k);
39 public static int Main ()
43 Console.WriteLine ("ERROR: {0}", result);
45 Console.WriteLine ("OK");