Updates the file with the current state of the buffer then clears the buffer.
[Visual Basic] Overrides Public Sub Flush() [C#] public override void Flush(); [C++] public: void Flush(); [JScript] public override function Flush();
Since a buffer can be used for either reading or writing, but not both simultaneously, Flush performs two functions. First, any data previously written to the buffer is copied to the file and the buffer is cleared. Second, if CanSeek is true and data was previously copied from the file to the buffer for reading, the current position within the file is decremented by the number of unread bytes in the buffer. The buffer is then cleared.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family