如何从正在调用的过程中传递值

时间:2018-08-11 04:33:39

标签: c# process

在main方法中,我想启动一个运行一些测试用例的过程,并且当该过程返回时,我想知道有多少个测试用例失败。在这种情况下,我希望进程能够在执行完成后将值返回给主进程。有没有办法做到这一点?我的代码如下:

 ProcessStartInfo processInfo = new ProcessStartInfo(exeFilePath, Parser.Default.FormatCommandLine(options));
 var p = Process.Start(processInfo);
 // need to get the number of failed test cases from the process

感谢您的帮助。

0 个答案:

没有答案