Closes the current stream and releases any resources associated with the current stream.
Following a call to this method, a call to another operation on the same stream might result in an exception (such as ObjectDisposedException, for example). However, if the stream is already closed, a call to Stream.Close throws no exceptions.