标签:div processes ring dna color roc name for 关闭
C#杀掉进程的方法
1 private static string CmdName = "cmd"; 2 /// <summary> 3 /// 关闭进程 4 /// </summary> 5 /// <param name="processName">进程名</param> 6 private void KillProcess(string processName) 7 { 8 Process[] myproc = Process.GetProcesses(); 9 foreach (Process item in myproc) 10 { 11 if (item.ProcessName == processName) 12 { 13 item.Kill(); 14 } 15 } 16 }
调用方式:
KillProcess(CmdName);
标签:div processes ring dna color roc name for 关闭
原文地址:http://www.cnblogs.com/xinglei/p/7056867.html