|
If you wish to display the output in the console window and redirect it to a file, you can take Dameon's suggestion a step further. Derive a new class from TextWriter or StreamWriter that has two private StreamWriter members (one of which is connected to the console, and the other to your file) and for the Write() method, provide an implementation that writes to both streams.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
|