linux-packaging-mono/mcs/tests/gtest-lambda-02.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

28 lines
408 B
C#

//
// 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");
}
}