PipeStream.ReadByte Method ()

 

Reads a byte from a pipe.

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

[SecurityCriticalAttribute]
public override int ReadByte()

Return Value

Type: System.Int32

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

Exception Condition
ObjectDisposedException

The pipe is closed.

NotSupportedException

The pipe does not support read operations.

InvalidOperationException

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

IOException

Any I/O error occurred.

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

.NET Framework
Available since 3.5
Return to top
Show: