C# - 如何调用一个exe文件加入到项目解决方案 [英] C# - How to call an exe added into project solution
本文介绍了C# - 如何调用一个exe文件加入到项目解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我增加了一个EXE到我的项目的解决方案。该EXE通过标准输出做一些东西,并输出数据。我想捕捉的输出,但更重要的是我如何执行该EXE我的计划之内?
解决方案
进程p =新工艺();
p.StartInfo.UseShellExecute = FALSE;
p.StartInfo.RedirectStandardOutput = TRUE;
p.StartInfo.FileName =myExec.exe;
p.Start();
So I added an EXE to my project's solution. The EXE does some stuff and outputs data via stdout. I want to capture the output, but more importantly how do I execute that EXE within my program?
解决方案
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "myExec.exe";
p.Start();
这篇关于C# - 如何调用一个exe文件加入到项目解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文