Pages

c# : Console Application - Get list of running processes

Get list of running processes
it's a console application

code
static void Main(string[] args)
{
Console.WriteLine("ID:\tProcess name:");
Console.WriteLine("--\t------------");
foreach (System.Diagnostics.Process process in System.Diagnostics.Process.GetProcesses())
Console.WriteLine("{0}\t{1}", process.Id, process.ProcessName);
Console.Read();
}

0 comment:

إرسال تعليق

Link With in

Related Posts Plugin for WordPress, Blogger...