We can get processes in a machine by using Process class.
Process[] process = Process.GetProcesses();
foreach (Process pro in process)
{
Console.WriteLine(pro.ProcessName);
}
or processes by name,
Process[] process = Process.GetProcessesByName("devenv");
foreach (Process pro in process)
{
Console.WriteLine(pro.SessionId);
}
Wednesday, January 21, 2009
Process in .NET
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment