C#得到系统进程和结束某个指定的进程

9/26/2006来源:C#应用人气:13159

获得当前计算机系统内所有的已启动的进程:
System.Diagnostics.PRocess[] processOnComputer = System.Diagnostics.Process.GetProcesses();
foreach ( System.Diagnostics.Process p in processOnComputer )
{
System.Console.WriteLine(p.ToString());
}
Console.ReadLine();
获得当前计算机系统内某个进程并关闭:
System.Diagnostics.Process[] process = System.Diagnostics.Process.GetProcessesByName("进程名称");

foreach ( System.Diagnostics.Process p in process)
{
p.Kill();
}

http://www.cnblogs.com/coderlee/archive/2006/09/25/513866.html