PipeStream.ReadByte Method

Definition

Reads a byte from a pipe.

public:
 override int ReadByte();
public override int ReadByte ();
[System.Security.SecurityCritical]
public override int ReadByte ();
override this.ReadByte : unit -> int
[<System.Security.SecurityCritical>]
override this.ReadByte : unit -> int
Public Overrides Function ReadByte () As Integer

Returns

The byte, cast to Int32, or -1 indicates the end of the stream (the pipe has been closed).

Attributes

Exceptions

The pipe is closed.

The pipe does not support read operations.

The pipe is disconnected, waiting to connect, or the handle has not been set.

Any I/O error occurred.

Remarks

Use the CanRead property to determine whether the current PipeStream object supports read operations.

Applies to