[configure] Add new target.
[mono-project.git] / mcs / tests / test-275.cs
blob80b5393759abe4b086e0029b96ab33b65a0ee9d7
1 using System;
3 public delegate int DelType ();
5 struct S
7 public event DelType MyEvent;
8 public static event DelType MyEventStatic;
10 public int RunInstance ()
12 return MyEvent ();
15 public int RunStatic ()
17 return MyEventStatic ();
21 public class Test
23 public static int Main ()
25 S.MyEventStatic += delegate () { return 22; };
26 S s = new S ();
27 s.MyEvent += delegate () { return 6; };
28 if (s.RunInstance () != 6)
29 return 1;
31 if (s.RunStatic () != 22)
32 return 2;
34 return 0;