Mono Class Library: System.IO.Stream Overview | Members

System.IO.Stream.ReadByte Method

Reads a byte from the stream and advances the position within the stream by one byte. [Edit]

public virtual int ReadByte ()

Returns

The unsigned byte cast to a int , or -1 if at the end of the stream. [Edit]

Exceptions

TypeReason
System.IO.IOExceptionAn I/O error has occurred. [Edit]
NotSupportedExceptionThe stream does not support reading. [Edit]
ObjectDisposedExceptionThe stream is closed. [Edit]

Remarks

Operation
As described above.

Note: Use the Stream.CanRead property to determine whether the current instance supports reading.

[Edit]

Requirements

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