Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-418.cs
1 using System;
2 using System.Reflection;
3
4 namespace N
5 {
6         class Nested
7         {
8                 public interface I<T>
9                 {
10                         T P { get; }
11                 }
12
13                 public class C : I<int>
14                 {
15                         int I<int>.P
16                         {
17                                 get { return 2; }
18                         }
19                 }
20         }
21
22         class M
23         {
24                 public static int Main ()
25                 {
26                         int count = 0;
27                         foreach (MethodInfo method in typeof (Nested.C).GetMethods (BindingFlags.Instance | BindingFlags.NonPublic)) {
28                                 Console.WriteLine (method.Name);
29                                 if (method.Name == "N.Nested.I<int>.get_P")
30                                         ++count;
31                         }
32
33                         foreach (PropertyInfo pi in typeof (Nested.C).GetProperties (BindingFlags.Instance | BindingFlags.NonPublic)) {
34                                 Console.WriteLine (pi.Name);
35                                 if (pi.Name == "N.Nested.I<int>.P")
36                                         count += 2;
37                         }
38                         
39                         return 3 - count;
40                 }
41         }
42 }