2010-04-07 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / test-617.cs
blobdafe515a0a8c2951e53796ac287824e72d6a76a6
1 using System;
2 using System.Reflection;
4 public delegate long MyDelegate ();
6 public interface X
8 event MyDelegate Foo;
9 int Prop { get; }
12 public class Y : X
14 event MyDelegate X.Foo {
15 add {
18 remove {
22 int X.Prop {
23 get { return 1; }
26 public event MyDelegate Foo;
28 public static int Main ()
30 MethodInfo o = typeof (Y).GetMethod ("X.add_Foo", BindingFlags.NonPublic | BindingFlags.Instance);
32 if (o == null)
33 return 1;
35 o = typeof (Y).GetMethod ("X.get_Prop", BindingFlags.NonPublic | BindingFlags.Instance);
36 if (o == null)
37 return 2;
39 Console.WriteLine ("OK");
40 return 0;