I found lots of samples how to redirect console output into a file. However I need an opposite soluiton - I have StreamWriter which I want to be shown in the Console output once I do sw.WriteLine("text");
+6
A:
Just point the stream to standard output:
sw = new StreamWriter(Console.OpenStandardOutput());
sw.AutoFlush = true;
Console.SetOut(sw);
John Feminella
2010-06-27 13:41:38