Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PipeStream::ReadByte Method ()

 

Reads a byte from a pipe.

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

public:
[SecurityCriticalAttribute]
virtual int ReadByte() override

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:
© 2017 Microsoft