Releases all resources used by the System.IO.Stream.
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.