C# System.Diagnostics.Process redirecting Standard Out for large amounts of data

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2010-05-25T22:43:21Z Indexed on 2010/05/25 22:51 UTC
Read the original article Hit count: 244

Filed under:
|
|

I running an exe from a .NET app and trying to redirect standard out to a streamreader. The problem is that when I do

myprocess.exe >> out.txt

out.txt is close to 14mb. When I do the command line version it is very fast but when I run the process from my csharp app it is excruciatingly slow because I believe the default streamreader flushes every 4096 bytes.

Is there a way to change the default stream reader for the Process object?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET