How do I know if the time limit has expired or the process was terminated by the user?

Process p = Process.Start(this.EmergencyApp, npLang);
p.WaitForExit(this.Timeout);
有帮助吗?

解决方案

WaitForExit() returns a boolean:

Return Value
true if the associated process has exited; otherwise, false.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top