static void Main(string[] args)
{
Func<int, int, int> addFunc = (a, b) => a+b;
addFunc.BeginInvoke(5, 6, new AsyncCallback((ar) =>
{
var func= ar.AsyncState as Func<int, int, int>;
Console.WriteLine(func.EndInvoke(ar));
}), addFunc);
Console.ReadKey();
}
时间: 2024-10-29 00:52:46