System.IO.Stream.WriteByte Method

Writes a byte to the current position in the stream and advances the position within the stream by one byte.

Syntax

public virtual void WriteByte (byte value)

Parameters

value
The byte to write to the stream.

Exceptions

TypeReason
System.IO.IOExceptionAn I/O error has occurred.
NotSupportedExceptionThe stream does not support writing.
ObjectDisposedExceptionThe stream is closed.

Remarks

Use the Stream.CanWrite property to determine whether the current instance supports writing.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0