1.在4.5框架中可以直接使用如下方法:
this.Invoke(new Action(() =>
{
textBox2.Text = Convert.ToString(a);
}));
2.在4.0的框架中要加入Dispatcher方法,具体如下:
this.Dispatcher.Invoke(new Action(() =>
{
textBox2.Text = Convert.ToString(a);
}));