Get the running processes

using System.Diagnostics;
...
...
Process[] processlist = Process.GetProcesses();
foreach(Process theprocess in processlist)
{
 Console.WriteLine("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id);
}
//properties of the Process object
p.StartTime   (Shows the time the process started)
p.TotalProcessorTime  (Shows the amount of CPU time the process has taken)
p.Threads   (gives access to the collection of threads in the process)

Comments

Popular posts from this blog

Convert XElement to DataTable

Enable mouse scroll-wheel in VB6

C# code to Check IE Proxy Settings