Process[] m_arrSysProcesses = Process.GetProcesses("."); foreach (Process processSingle in m_arrSysProcesses) { if (processSingle.ProcessName.IndexOf("DOLTopiaServer") != -1) { ProcessThreadCollection thrdColl = processSingle.Threads; threadcount = thrdColl.Count; } }