Type Reason System.IO.IOException The current stream is closed. NotSupportedException The current stream does not support writing. ObjectDisposedException The current stream is closed.
This method overrides Stream.WriteByte(byte).
Use WriteByte to write a byte to a FileStream efficiently. If the stream is closed or not writable, an exception will be thrown.
Use the FileStream.CanWrite property to determine whether the current instance supports writing. For additional information, see Stream.CanWrite.