我们如何将流程与waitForExit()方法相关联 [英] How we associate a process with waitForExit() method
本文介绍了我们如何将流程与waitForExit()方法相关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
第1行.System.Diagnostics.Processobj =新的System.Diagnostics.Process();
第2行.obj.WaitForExit();
第3行.System.Diagnostics.Process.Start("C:\\ Project \\ emgscan.exe",sorce.FullName);
我们如何将第3行与第4行关联.
line 1. System.Diagnostics.Process obj = new System.Diagnostics.Process();
line 2. obj.WaitForExit();
line 3. System.Diagnostics.Process.Start("C:\\Project\\emgscan.exe", sorce.FullName);
How we associate line 3 to line 4.
推荐答案
通过使用 ProcessStartInfo 对象包含名称可执行文件和其他内容.
请参见此处 [ ^ ]
请特别注意带有指向 ProcessStartInfo 的链接的部分,并按照链接进行阅读以获取更多信息.
祝你好运! :)
By using a ProcessStartInfo object to contain the name of the executable and other things.
See here[^]
Pay particular attention to the section with a link to ProcessStartInfo and also follow the links for more reading.
Good luck! :)
这篇关于我们如何将流程与waitForExit()方法相关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文