How to direct output of console application to the screen?

J

Johann Schuler

I'm learning C#. I want to direct a console application's output to a screen
where I can select and copy some of the text. How do I do this? Many thanks!
 
I

Ian Semmel

In any console program you can redirect output to a file and then use an editor
or something to view it but why bother ? Why not just make a new Windows program
which is just as easy.
 
C

Chris Dunaway

Check out the ProcessStartInfo class which is in System.Diagnostics and
in particular the RedirectStandardOutput property. This will let you
redirect the standard output from a console program to a stream from
which you can then read the text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top