1 // 主线程 2 // ToDo 3 4 // 通过匿名方法,启动子线程 5 new System.Threading.Thread(() => 6 { 7 App.Current.Dispatcher.Invoke(new Action(() => 8 { 9 // 通过匿名方法 10 // 子线程 ToDo 11 12 })); 13 }).Start();
C#-在主线程中创建子线程
猜你喜欢
转载自www.cnblogs.com/allenzhang/p/10402192.html
今日推荐
周排行