[sdks] Fix README.md
[mono-project.git] / mcs / tests / test-313.cs
blob2c72adefa6ddcacb825ff1c0da8538a180221213
1 using System.Reflection;
2 using System;
3 using A;
5 namespace A {
6 interface B {
7 void METHOD ();
12 class D : B {
13 void B.METHOD ()
17 public static int Main ()
19 MethodInfo [] mi = typeof (D).GetMethods (BindingFlags.Instance | BindingFlags.NonPublic);
20 MethodInfo m = null;
22 foreach (MethodInfo j in mi){
23 if (j.Name.IndexOf ("METHOD") != -1){
24 m = j;
25 break;
28 if (m == null)
29 return 1;
31 if (m.Name != "A.B.METHOD"){
32 Console.WriteLine ("Incorrect method name, expecting: {0} got {1}",
33 "A.B.METHOD", m.Name);
34 return 2;
37 return 0;