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

test-86.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: faf1ae20a18d92b9dfa321dcb995662b33a1a608 (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
40
41
42
43
44
45
using System;

namespace T {
	public class T {
		
		static int method1 (Type t, int val)
		{
			Console.WriteLine ("You passed in " + val);
			return 1;
		}

		static int method1 (Type t, Type[] types)
		{
			Console.WriteLine ("Wrong method called !");
			return 2;
		}

		static int method2 (Type t, int val)
		{
			Console.WriteLine ("MEthod2 : " + val);
			return 3;
		}

		static int method2 (Type t, Type [] types)
		{
			Console.WriteLine ("Correct one this time!");
			return 4;
		}
		
		public static int Main()
		{
			int i = method1 (null, 1);

			if (i != 1)
				return 1;
			
			i = method2 (null, null);
			
			if (i != 4)
				return 1;
			
			return 0;
		}
	}
}