17 lines
271 B
C#
17 lines
271 B
C#
|
|
||
|
// Supported by C# 3.0
|
||
|
|
||
|
public class C
|
||
|
{
|
||
|
public delegate T Func<T> (T t);
|
||
|
|
||
|
public static void Test<T, U> (Func<T> f, U u)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public static void Main ()
|
||
|
{
|
||
|
Test<int, string> (delegate (int i) { return i; }, "");
|
||
|
Test (delegate (int i) { return i; }, 1);
|
||
|
}
|
||
|
}
|