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 current stream.

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

Syntax

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

Return Value

Type: System. . :: . .Int32
The byte cast to a Int32, or -1 if the end of the stream has been reached.

Remarks

If the read operation is successful, the current position within the stream is advanced by one byte. If an exception occurs, the current position within the stream is unchanged.

.NET Framework Security

See Also

Reference

MemoryStream Class

System.IO Namespace