本帖最后由 夏闯富 于 2013-10-14 16:41 编辑
第二个线程的实例应该叫thread2,应该是 thread2.Name = "t2";而不是 thread.Name = "t2";
代码应该是这样的吧:- Thread thread = new Thread(ChangTxt);
- thread.Name = "t1";
- thread.IsBackground = true;
- thread.Start();
- Thread thread2 = new Thread(ChangTxt);
- thread2.Name = "t2";
- thread2.IsBackground = true;
- thread2.Start();
复制代码 |