C#线程调用带参数的方法,给控件赋值


System.Threading.Thread thread = new System.Threading.Thread(() =>
{

//各种业务


//定义一个委托
public delegate void ProcessDelegate(string a);
if (this.lbStatus.InvokeRequired)
{
ProcessDelegate df = new ProcessDelegate(AddStatus);
this.Invoke(df, new object []{ "调用Web Service过程产生错误:" + ls_ErrMsg });
}
});
thread.IsBackground = true;
thread.Start;

----以上自己修改,亲测可以使用

参考自 : http://www.jb51.net/article/56428.htm

原文地址:https://www.cnblogs.com/liwp/p/7241165.html