Get the list of thread of a process
using System.Diagnostics;
...
ProcessThreadCollection threadlist = theProcess.Threads;
foreach(ProcessThread theThread in threadlist)
{
Console.WriteLine("Thread ID:{0} Priority: {1} Started: {2}", theThread.Id, theThread.PriorityLevel, theThread.StartTime);
}
...
ProcessThreadCollection threadlist = theProcess.Threads;
foreach(ProcessThread theThread in threadlist)
{
Console.WriteLine("Thread ID:{0} Priority: {1} Started: {2}", theThread.Id, theThread.PriorityLevel, theThread.StartTime);
}
Comments
Post a Comment