Duplicate
http://stackoverflow.com/questions/415620/redirect-console-output-to-textbox-in-separate-program-c http://stackoverflow.com/questions/353601/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.