Listing Running Processes in c#.net

1. Add List box on a Forms.
2. Now add a reference to System.Diagnostics

Code:

Process[] curProcesses = Process.GetProcesses();

foreach (Process p in curProcesses)
{
listBox1.Items.Add(p.ProcessName);
}

Output:

process

 

Sandeep

a dev, an amateur photographer and a father

 

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: