导读: C#中获取进程,C#强制结束进程 // 获取系统内所有进程 System.Diagnostics.Process[] currentprocess = System.Diagnostics.Process.GetProcesses(); foreach (System.Diagnostics.Process p in currentprocess) { System.Console.WriteLine(p.ToString()); } // 结束进程 System.Diagnostics.Process[] killprocess = System.Diagnostics.Process.GetProcessesByName("calc"); foreach (System.Diagnostics.Process p in killprocess) { p.Kill(); } 本文转自 http://hi.baidu.com/yuyu_/blog/item/2c19ce5cfc420d47fbf2c0d6.html