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

test-725.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f139e095caa6eb6c98902e0f47f9115c2f4cb9d3 (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
using System;
using System.Reflection;
using System.Runtime.InteropServices;

public delegate int D ([In] ref int arg);

class B
{
	public static int Main ()
	{
		var methods = typeof (D).GetMethods ();
		foreach (var m in methods) {
			var pi = m.GetParameters ();
			switch (m.Name) {
			case "Invoke":
				if (!pi[0].IsIn)
					return 1;
				break;
			case "BeginInvoke":
				if (!pi[0].IsIn)
					return 2;
				break;
			case "EndInvoke":
				if (!pi[0].IsIn)
					return 3;

				break;
			}
		}

		return 0;
	}
}