3 public delegate int DelType ();
7 public event DelType MyEvent
;
8 public static event DelType MyEventStatic
;
10 public int RunInstance ()
15 public int RunStatic ()
17 return MyEventStatic ();
23 public static int Main ()
25 S
.MyEventStatic
+= delegate () { return 22; }
;
27 s
.MyEvent
+= delegate () { return 6; }
;
28 if (s
.RunInstance () != 6)
31 if (s
.RunStatic () != 22)