The System.Diagnostics.Process object gives you access to functionality enabling you to manage system processes. We will use this object to get a list of running processes.
Add this line to your using list:
Now you can get a list of the processes with the Process.GetProcesses() method, as seen in this example:
Some interesting properties of the Process object:
foreach(Process theprocess in processlist){ Console.WriteLine(“Process: {0} ID: {1}”, theprocess.ProcessName, theprocess.Id); }
The .NET framework really makes things simple!