110,571
社区成员
发帖
与我相关
我的任务
分享
a.BeginInvoke(s=>
{
Action x = (Action)s.AsyncState;
x.EndInvoke(s);
},a);
AutoResetEvent evt = new AutoResetEvent(false);
Action a = () =>
{
while (true) {
if (evt.WaitOne())
{
break;
}
}
};
a.BeginInvoke(s =>
{
Action x = (Action)s.AsyncState;
x.EndInvoke(s);
}, a);
Console.ReadLine();
evt.Set();