C# - Realtime console output redirection

Posted by Levo on Stack Overflow See other posts from Stack Overflow or by Levo
Published on 2010-12-21T16:30:13Z Indexed on 2010/12/21 16:54 UTC
Read the original article Hit count: 171

Filed under:
|
|
|

I'm developing a C# application and I need to start an external console program to perform some tasks (extract files). What I need to do is to redirect the output of the console program. Code like this one does not work, because it raises events only when a new line is writen in the console program, but the one I use "updates" what's shown in the console window, without writting any new lines. How can I raise an event every time the text in the console is updated? Or just get the output of the console program every X seconds? Thanks in advance!

© Stack Overflow or respective owner

Related posts about c#

Related posts about redirect