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

dtest-024.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cf4d1f2df8aa8443948653ed624eff30d759af32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;

// Tests private accessibility for dynamic binder

class Test
{
	private delegate int D ();
	private int field = 9;

	public static int Main ()
	{
		D del = () => 5;
		dynamic d = del;
		if (d () != 5)
			return 1;

		d = new Test ();
		if (d.field != 9)
			return 2;

		return 0;
	}
}