使用C#编写创建一个线程的代码
2023-06-30
using System;
using System.IO;
using System.Threading ;
class MyThread
public int count;
string thrdName;
public MyThread(string name)
count=0;
thrdName=name;
public void run()
Console.WriteLine(thrdName+”starting.”);
do
Thread.Sleep(500);
Console.WriteLine(“In”+thrdName+”, count is “+count);
count++;
while(count