using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Process[] ps = Process.GetProcesses(); foreach (System.Diagnostics.Process p in ps) { //如果进程为aspnet_wp,则关闭进程 if (p.ProcessName.ToLower() == "aspnet_wp") { p.Kill(); break; } } } } }
c# 关闭指定进程
最新推荐文章于 2024-03-25 00:07:06 发布