a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
20 lines
295 B
C#
20 lines
295 B
C#
|
|
|
|
using System;
|
|
|
|
public delegate TResult Func<TArg0, TResult> (TArg0 arg0);
|
|
|
|
class Demo
|
|
{
|
|
static Y F<X, Y> (int a, X value, Func<X, Y> f1)
|
|
{
|
|
return f1 (value);
|
|
}
|
|
public static int Main ()
|
|
{
|
|
object o = F (1, "1:15:30", s => TimeSpan.Parse (s));
|
|
Console.WriteLine (o);
|
|
return 0;
|
|
}
|
|
}
|