Share via


Stream.ReadByte Method

Reads a byte from the current Stream object and advances the position within the stream by one byte, or returns -1 if the end of the stream has been reached.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)

Syntax

public virtual int ReadByte ()

Return Value

The unsigned byte cast to an Int32 variable, or -1 if the end of the stream has been reached.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Stream Class
Stream Members
System.IO Namespace