public void showDelegate(){}
if (textBox1.InvokeRequired){
textBox1.Invoke(new showDelegate(delegate (){
//你的代码
});
}
base.Invoke(new Action(delegate() {
//你的代码
}));
WPF ObservableCollection 线程报错委托解决
Application.Current.Dispatcher.Invoke(new Action(() => {
//你的代码
}));