How can I redirect whatever is written to the console to be written into a string?
+13
A:
For your own process, Console.SetOut
and redirect it to a TextWriter built on top of a string builder or memory stream. For a launched child process, use ProcessStartInfo.RedirectStandardOutput
when launching the process.
Remus Rusanu
2010-03-17 23:30:42