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

dtest-036.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9b5bbc095bc6e670eb5ae4d04d0b7ffaed8c64da (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
using System;

public class C
{
	event Func<int, int> E;
	Func<int, int> D;

	public static int Main ()
	{
		var c = new C ();
		Func<int, int> v = Foo;
		dynamic[] arr = new dynamic [] { v };
		
		c.E += arr [0];
		if (c.E.GetInvocationList ().Length != 1)
			return 1;

		c.D += arr [0];
		if (c.D.GetInvocationList ().Length != 1)
			return 2;
		
		return 0;
	}
	
	static int Foo (int ii)
	{
		return 9;
	}
}