C# 多线程数组,如何得到当前线程的名字?
public Thread[] thStep;
public int thStepCount=5;
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < thStepCount; i++)
{
thStep[i] = new Thread(startWebBrower);
thStep[i].Name = i.ToString();
thStep[i].Start();
}
}
private void startWebBrower()
{
//如何得到当前线程的名字?
}