System.IO.Stream.Dispose Method

Releases all resources used by the System.IO.Stream.

Syntax

public void Dispose ()

Remarks

This method disposes the stream, by writing any changes to the backing store and closing the stream to release resources. 

Calling Dispose allows the resources used by the System.IO.Stream to be reallocated for other purposes. For more information about Dispose, see Cleaning Up Unmanaged Resources.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0