Share via


ReadByte Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overridable Function ReadByte As Integer
public virtual int ReadByte()
public:
virtual int ReadByte()
abstract ReadByte : unit -> int 
override ReadByte : unit -> int 
public function ReadByte() : int

Return Value

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

Remarks

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

.NET Framework Security

See Also

Reference

Stream Class

System.IO Namespace