学习下面代码,有点意思
Func<int, int> v = n=> { Thread.Sleep(1000); return n; }; var ar= v.BeginInvoke(100,null,null); Console.WriteLine("main"); while (ar.IsCompleted == false) { Console.Write("."); } var a = v.EndInvoke(ar); Console.WriteLine("over"); Console.ReadKey();