Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / gtest-418.cs
blob7ed88aa75a5501b1b4b706fbbdac566979d8d3ec
1 using System;
2 using System.Reflection;
4 namespace N
6 class Nested
8 public interface I<T>
10 T P { get; }
13 public class C : I<int>
15 int I<int>.P
17 get { return 2; }
22 class M
24 public static int Main ()
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;
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;
39 return 3 - count;