Home / Code Snippets / Blog article: Get A List Of Running Processes Using C# – Code Snippet

| RSS

Get A List Of Running Processes Using C# – Code Snippet

January 27th, 2009 | No Comments | Posted in Code Snippets

This code will retrieve a list of currently running process on a machine and write their names to console.

// Get A List of process using 
// System.Diagnostics.Process class
List<Process> processes = Process.GetProcesses().ToList();

// Write them out to Console
processes.ForEach(x => Console.WriteLine(x.ProcessName));

Leave a Reply 4025 views, 3 so far today |

Leave a Reply