This method is equivalent to FileStream.Dispose(bool)(true).
Any data previously written to the buffer is copied to the file before the file stream is closed, so it is not necessary to call FileStream.Flush before invoking Close. Following a call to Close, any operations on the file stream might raise exceptions. Invoking this method on the same instance multiple times does not result in an exception.