c# 强制杀掉进程

来源:互联网 发布:js 720度全景 编辑:程序博客网 时间:2024/05/18 22:16
  //System.Diagnostics.Process[] pro = System.Diagnostics.Process.GetProcessesByName("EXCEL");
                //foreach (System.Diagnostics.Process p in pro)
                //{
                //    if (!string.IsNullOrEmpty(p.ProcessName))
                //    {
                //        try
                //        {
                //            p.Kill();
                //        }
                //        catch (Exception)
                //        {


                //            throw;
                //        }
                //    }
                //}
                //GC.Collect();
0 0
原创粉丝点击