update readme (#21797)
[mono-project.git] / mcs / tests / test-497.cs
blob6cad8c7c9504f3c9c67ee2ff8a61d3d5b67161a8
1 using System;
3 public class PlotMenuItem
5 private EventHandler callback_;
6 static int set;
8 public PlotMenuItem ()
12 public PlotMenuItem (EventHandler callback)
14 callback_ = callback;
16 PlotMenuItem child = new PlotMenuItem ();
17 child.Callback += new EventHandler (callback);
20 public static int Main ()
22 PlotMenuItem pmi = new PlotMenuItem (new EventHandler (MenuItem_Click));
23 pmi.Callback (null, null);
25 if (set != 999)
26 return 1;
28 return 0;
31 static void MenuItem_Click (object sender, EventArgs e)
33 set = 999;
36 public EventHandler Callback {
37 get { return callback_; }
38 set { callback_ = value; }