c# process 获取进程退出码
有两种方式:
1.等待进程退出,会阻塞当前线程
Process.WaitForExit
2.使用Event,注册进程退出事件
Process.EnableRaisingEvents = true;
Process.Exited += new EventHandler(WorkerExited);
有两种方式:
1.等待进程退出,会阻塞当前线程
Process.WaitForExit
2.使用Event,注册进程退出事件
Process.EnableRaisingEvents = true;
Process.Exited += new EventHandler(WorkerExited);