C# 杀掉指定名字的进程程序代码
public static void stopNamedProcess(string name) { foreach (Process p in System.Diagnostics.Process.GetProcessesByName(name)) { try { p.Kill(); p.WaitForExit(); } catch (Exception exp) { Console.WriteLine(exp.Message); System.Diagnostics.EventLog.WriteEntry("AlchemySearch:KillProcess", exp.Message, System.Diagnostics.EventLogEntryType.Error); } } }