It is determined by the size of the internal buffer (I believe you can
modifiy its size).
Also the writer flushes if the file is closed. To ensure that files are
always closed use the using statement:
using (BinaryWriter bw = new BinaryWriter(new
FileStream("c:\Test.bin",FileMode.Append)))
{
// do stuff with file here
}
// file is automatically closed
"Boris" <bo***@crabel.com> schrieb im Newsbeitrag
news:uG**************@TK2MSFTNGP10.phx.gbl...
// Example
BinaryWriter bw = new BinaryWriter(new
FileStream("c:\Test.bin",FileMode.Append));
BinaryWriter.Write writes data to the stream. However, it doesn't
automatically flush data any buffered data to the underlying device. What
determines *when* data is written to the underlying device, without
calling Flush function.
Thank you,
-Boris