C# Task注意事项

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

Task.Factory.StartNew(() =>
{

}).ContinueWith(task =>
{
    this.Invoke(new Action(() => { MessageBox.Show(this, "执行完成"); }));
});

 

posted @ 2019-02-15 09:37  zhyue93  阅读(689)  评论(0编辑  收藏  举报