Duplicate
Redirect console output to textbox in separate program Capturing nslookup shell output with C#
I am looking to call an external program from within my c# code.
The program I am calling, lets say foo.exe returns about 12 lines of text.
I want to call the program and parse thru the output.
What is the most optimal way to do this ?
Code snippet also appreciated :)
Thank You very much.
See Question&Answers more detail:os