using System.Collections.Generic;
delegate TD Func
();
delegate TR Func(TA arg);
public class C
{
static IEnumerable Test (T t)
{
return null;
}
static IEnumerable Test (Func f)
{
return null;
}
static IEnumerable Test2 (Func f)
{
return null;
}
public static void Main ()
{
IEnumerable ie = Test (1);
IEnumerable se;
se = Test (() => "a");
se = Test (delegate () { return "a"; });
se = Test2 ((string s) => "s");
}
}
|