C# 并入UI线程

Dispatcher.Invoke(
                new Action(delegate {
                    textBox.Text+= msg;
                })
                );
System.Windows.Application.Current.Dispatcher.Invoke(new System.Action(() =>
                    {
                        IPrism.progressBar.Show();
 
                    }));
原文地址:https://www.cnblogs.com/lingLuoChengMi/p/12766116.html