Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-313.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2c72adefa6ddcacb825ff1c0da8538a180221213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Reflection;
using System;
using A;

namespace A {
	interface B {
		void METHOD ();
	}
}


class D : B {
	void B.METHOD ()
	{
	}

	public static int Main ()
	{
		MethodInfo [] mi = typeof (D).GetMethods (BindingFlags.Instance | BindingFlags.NonPublic);
		MethodInfo m = null;
		
		foreach (MethodInfo j in mi){
			if (j.Name.IndexOf ("METHOD") != -1){
				m = j;
				break;
			}
		}
		if (m == null)
			return 1;

		if (m.Name != "A.B.METHOD"){
			Console.WriteLine ("Incorrect method name, expecting: {0} got {1}",
					   "A.B.METHOD", m.Name);
			return 2;
		}

		return 0;
	}
}