6 public delegate void TestDelegate ();
8 static long sum_i
, sum_k
, sum_p
;
12 TestDelegate d
= null;
13 for (int i
= 1; i
<= 5; i
++) {
15 TestDelegate temp
= delegate {
16 Console
.WriteLine ("i = {0}, k = {1}, p = {2}", i
, k
, p
);
25 Console
.WriteLine ("SUM i = {0}, k = {1}, p = {2}", sum_i
, sum_k
, sum_p
);
33 sum_i
= sum_k
= sum_p
= 0;
35 Console
.WriteLine ("SUM i = {0}, k = {1}, p = {2}", sum_i
, sum_k
, sum_p
);
41 if (sum_p
!= 1152385024)
46 public static int Main ()
50 int result
= x
.Test ();
52 Console
.WriteLine ("ERROR: {0}", result
);
54 Console
.WriteLine ("OK");