C#操作系统进程的源码演示
下边内容内容是关于C#操作系统进程的演示的内容。
private bool CloseProcess(string CloseProcessName) { try { Process[] MyProcessS = Process.GetProcessesByName(CloseProcessName); foreach (Process MyProcess in MyProcessS) { MyProcess.Kill(); MyProcess.WaitForExit(); MyProcess.Close(); Thread.Sleep(10000); } } catch (Exception) { return false; } return true; } public bool StartProcess(string StartProPath) { try { Process TheStartProcess = Process.Start(StartProPath); } catch (Exception) { return false; } return true; }
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。