I want to save a log file, and I use TextWriter / StreamWriter to write messages to my log file. I call TextWriter.Flush () after recording the message, but my message still does not appear immediately. It appears only when Close is called, and I would prefer not to open and close the file all the time to immediately see the messages.
source share