关于多线程的问题,急呀
Thread thread1 = new Thread(new ThreadStart(Method1));
如果方法Method1有参数怎么处理,怎么传进去呀?
------解决方案--------------------Thread newThread = new Thread(
new ParameterizedThreadStart(Work.DoWork));
------解决方案--------------------ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.chs/cpref12/html/C_System_Threading_Thread_ctor_1_e41c9448.htm
------解决方案--------------------方法再调方法,使用大类下面的 定义一个你要传递的参数
例如:Thread thread1 = new Thread(new ThreadStart(Method1));
private int param=0;
private void Method1()
{
Method2(param);
}
private void Method2(int param)
{
//处理吧!
}