I have a C# 2008 console application where all the output is displayed in DOS popup windows instead of being written to a log file.
Thus can you tell me what I can do to have all messages in this console application appear in a log file instead of these dos pop windows? Can you show me in code how to accomplish this goal?
C# console log file
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hemant SrivastavaRank #581 · 4.2K reputationPosted Oct 18, 2012, 7:06 AM EDT
StreamWriter Writer = new StreamWriter("Output_File_Name");
Writer.WriteLine("Your Message output");
Hemant SrivastavaRank #581 · 4.2K reputationPosted Oct 17, 2012, 10:21 AM EDT
dcRank #2,247 · 627 reputationPosted Oct 17, 2012, 10:34 AM EDT
Is there a way to tell the difference of when these two diferent types of dos windows show up?
Hemant SrivastavaRank #581 · 4.2K reputationPosted Oct 17, 2012, 11:18 AM EDT
dcRank #2,247 · 627 reputationPosted Oct 17, 2012, 9:09 PM EDT