Updates the underlying file with the current state of the buffer and subsequently clears the buffer.
Type Reason System.IO.IOException An I/O error occurred. ObjectDisposedException The current instance has already been closed.
A System.IO.FileStream buffer can be used either for reading or writing. If data was copied to the buffer for writing, it is written to the file and the buffer is cleared.
If data was copied to the buffer for reading, and the Stream.CanSeek property is true, the current position within the file is decremented by the number of unread bytes in the buffer. The buffer is then cleared.
Note: This method overrides Stream.Flush.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0