Mono Class Library: System.IO.Stream Overview | Members

System.IO.Stream.Flush Method

Flushes the internal buffer. [Edit]

public abstract void Flush ()

Exceptions

TypeReason
System.IO.IOExceptionAn I/O error occurs. [Edit]
ObjectDisposedExceptionThe stream is closed. [Edit]

Remarks

Note: Implementers should use this method to move any information from an underlying buffer to its destination. The Stream.Flush method should clear the buffer, but the stream should not be closed. Depending upon the state of the object, the current position within the stream might need to be modified (for example, if the underlying stream supports seeking). For additional information see Stream.CanSeek .

Operation
As described above.

Note to Inheritors
Override Stream.Flush on streams that implement a buffer.

[Edit]

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0