代码如下 using System; using System.Collections.Generic; using System.Text; using System.Threading; namespace ConsoleApplication1 { class CStatusChecker { //执行次数计数,初始为0,内部使用 private int m_nInvoikeCount = 0; //所需要执行的最大次数 private int m_nMaxCount; public int MaxCount { get{return m_nMaxCount;} } public CStatusChecker(int count) { m_nMaxCount = count; } //状态检查函数 public void CheckStatus(object stateInfo) { AutoResetEvent autoEvent = (AutoResetEvent)stateInfo; Console.WriteLine("{0} 检查正在在进行 第{1}次.", DateTime.Now.ToString("HH:mm:ss.fff"), m_nInvoikeCount.ToString()); m_nInvoikeCount++; //检查是不已经完成 if (m_nInvoikeCount == m_nMaxCount) { m_nMax