a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
36 lines
366 B
C#
36 lines
366 B
C#
//
|
|
using System;
|
|
|
|
delegate void D ();
|
|
|
|
class X {
|
|
static D r;
|
|
|
|
public static void Main ()
|
|
{
|
|
D d = T ();
|
|
|
|
d ();
|
|
r ();
|
|
r ();
|
|
}
|
|
|
|
static D T ()
|
|
{
|
|
int var1 = 0;
|
|
|
|
D d = delegate () {
|
|
int var2 = 1;
|
|
|
|
r = delegate {
|
|
Console.WriteLine ("var1: {0} var2: {1}", var1, var2);
|
|
var2 = var2 + 1;
|
|
};
|
|
|
|
var1 = var1 + 1;
|
|
};
|
|
|
|
return d;
|
|
}
|
|
}
|