Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-617.cs
1 using System;
2 using System.Reflection;
3
4 public delegate long MyDelegate ();
5
6 public interface X
7 {
8         event MyDelegate Foo;
9         int Prop { get; }
10 }
11
12 public class Y : X
13 {
14         event MyDelegate X.Foo {
15                 add {
16                 }
17
18                 remove {
19                 }
20         }
21         
22         int X.Prop {
23                 get { return 1; }
24         }
25
26         public event MyDelegate Foo;
27
28         public static int Main ()
29         {
30                 MethodInfo o = typeof (Y).GetMethod ("X.add_Foo", BindingFlags.NonPublic | BindingFlags.Instance);
31                 
32                 if (o == null)
33                         return 1;
34                 
35                 o = typeof (Y).GetMethod ("X.get_Prop", BindingFlags.NonPublic | BindingFlags.Instance);
36                 if (o == null)
37                         return 2;
38                 
39                 Console.WriteLine ("OK");
40                 return 0;
41         }
42 }