System.IO.Pipes.PipeStream.Read Method

Reads a block of bytes from a stream and writes the data to a specified buffer.

Syntax

[System.MonoTODO]
public override int Read (byte[] buffer, int offset, int count)

Parameters

buffer
When this method returns, contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offset
The byte offset in the buffer array at which the bytes that are read will be placed.
count
The maximum number of bytes to read.

Returns

The total number of bytes that are read into buffer. This might be less than the number of bytes requested if that number of bytes is not currently available, or 0 if the end of the stream is reached.

Remarks

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

Calling the PipeStream.Read(Byte[], int, int) method blocks until count bytes are read or the end of the stream is reached. For asynchronous read operations, see PipeStream.BeginRead(Byte[], int, int, AsyncCallback, object) and PipeStream.EndRead(IAsyncResult).

Requirements

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