C# Task注意事项

1、在Task中调用主线程控件

Task.Factory.StartNew(() =>
{

}).ContinueWith(task =>
{
    this.Invoke(new Action(() => { MessageBox.Show(this, "执行完成"); }));
});
原文地址:https://www.cnblogs.com/zhyue93/p/task1.html