相关疑难解决方法(0)

为什么我的Winforms应用程序中的SynchronizationContext.Current为null?

我刚写了这段代码:

System.Threading.SynchronizationContext.Current.Post(
    state => DoUpdateInUIThread((Abc)state), 
    abc);
Run Code Online (Sandbox Code Playgroud)

但System.Threading.SynchronizationContext.Current为null

c# multithreading winforms synchronizationcontext

20
推荐指数
2
解决办法
2万
查看次数