[Mono-list] Buffering for StreamWriter
Jerry Houston
jerry@jhouston.net
Thu, 16 May 2002 07:18:22 -0700
From: "Nick Drochak" <ndrochak@gol.com>
Subject: [Mono-list] Buffering for StreamWriter
:
: I've added buffering to StreamWriter. I had to tweak System.Console too
in
: order for it to work properly. As the docs say, you must call Close() on
: the stream writer to ensure the buffer is written to the stream. So, I
made
: Console use AutoFlush on the stream writer.
I always call Flush() on StreamWriter before calling Close(). Is that
unnecessary? And if you Flush() but don't Close(), is the file properly
closed anyway when the StreamWriter goes out of scope?