9 public event EventHandler MyEvent
11 add { myEvent += delegate { value (this, EventArgs.Empty); }; }
12 remove { myEvent += delegate { value (this, EventArgs.Empty); }; }
15 public void RaiseMyEvent (object o, EventArgs e)
20 public static void Main ()
22 MainClass c = new MainClass ();
23 c.MyEvent += (o, e) => Console.WriteLine ("Hey! from {0} / {1}", o, e);
24 c.RaiseMyEvent (null, null);