C# Task注意事项
1、在Task中调用主线程控件
Task.Factory.StartNew(() => { }).ContinueWith(task => { this.Invoke(new Action(() => { MessageBox.Show(this, "执行完成"); })); });
Task.Factory.StartNew(() => { }).ContinueWith(task => { this.Invoke(new Action(() => { MessageBox.Show(this, "执行完成"); })); });