在软件开发中常常需要获得线程的状态,用线程对象的IsAlive属性可以判断线程的状态。
主要程序代码。
System.Threading.Thread th = new System.Threading.Thread(Show); th.Start(); if(th.IsAlive) { }