Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.

Namespace: Contracts
Assembly: Contracts (in Contracts.dll)

Public Overrides Function ReadByte() As Integer
This language is not supported or no code example is available.
public override int ReadByte()
This language is not supported or no code example is available.
public:  
int ReadByte()
This language is not supported or no code example is available.
public function ReadByte() : int;
This language is not supported or no code example is available.

Return Value

Type: int

The unsigned byte cast to an Int32, or -1 if at the end of the stream.

Exception type Condition

ObjectDisposedException

Methods were called after the stream was closed.

NotSupportedException

The stream does not support reading.

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1