110,545
社区成员
发帖
与我相关
我的任务
分享
private void Form1_Load(object sender, EventArgs e)
{
System.Threading.Thread thread1 = new System.Threading.Thread(new System.Threading.ThreadStart(test));
thread1.Name = "thread1";
System.Threading.Thread thread2 = new System.Threading.Thread(new System.Threading.ThreadStart(test));
thread2.Name = "thread2";
thread1.Start();
thread2.Start();
}
private void test()
{
Console.WriteLine(System.Threading.Thread.CurrentThread.Name);
}