Redirect Console output to text file
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all, I want my Console.WriteLine(...) output to be saved in a text file AS WELL AS displayed on the console screen. I know how to get the output to go to the text file instead of the screen (use Console.SetOut to the stream provided by a new StreamWriter, say). But I can't get the output to go to BOTH! I am probably being very stupid, and there is a simple answer, but all the google hits discuss the situation where you want the output to go to the text file instead of the console window. Thanks for anything you can suggest! Russ