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

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

delegate int D ();

class X {

	public static void Main ()
	{
		D x = T (1);

		Console.WriteLine ("Should be 2={0}", x ());
	}

	static D T (int a)
	{
		D d = delegate {
			a = a + 1;
			return a;
		};

		return d;
	}
}