2008-09-29 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / test-497.cs
blob0d2669427bfb182a189387cbab084bc19eef3ad1
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 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; }