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

test-722.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 182c78fe30c95cf05839264b6a506220b16fb477 (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
// Compiler options: -langversion:future

using System;

public class Blah
{
	public delegate int MyDelegate (int i, int j = 7);
	
	public int Foo (int i, int j)
	{
		return i+j;
	}

	public static int Main ()
	{
		Blah i = new Blah ();
		MyDelegate del = new MyDelegate (i.Foo);

		int number = del (2);

		Console.WriteLine (number);
		if (number != 9)
			return 1;

		return 0;
	}
}