2007-05-25 Jonathan Chambers <joncham@gmail.com>
[mcs.git] / tests / test-313.cs
blob09f0d98ad6681ba2d9284327b97193c56a7205f0
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 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;