summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-lambda-02.cs
blob: 819573ced0da22ff0377717769a8224d70507f9f (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

//
// Lambda expression test overload resolution with parameterless arguments
//

using System;
delegate string funcs (string s);
delegate int funci (int i);

class X {
	static void Foo (funci fi)
	{
		int res = fi (10);
		Console.WriteLine (res);
	}
	
	static void Foo (funcs fs)
	{
		string res = fs ("hello");
		Console.WriteLine (res);
	}

	public static void Main ()
	{
		Foo (x => x + "dingus");
	}
}