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

gtest-334.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 37e5ac06a7a7fc63d6bf8d3e6491b9edf81132ec (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;

public class Test
{
	public delegate void DelegateA (bool b);
	public delegate int DelegateB (int i);

	static DelegateA dt;
	static DelegateB dt2;

	public static int Main ()
	{
		bool b = DelegateMethod == dt;
		if (b)
			return 1;

		b = DelegateMethod != dt;
		if (!b)
			return 2;

		b = dt2 == DelegateMethod;
		if (b)
			return 3;

		Console.WriteLine ("OK");
		return 0;
	}

	static void DelegateMethod (bool b)
	{
	}

	static int DelegateMethod (int b)
	{
		return 4;
	}
}