StreamExtensions.ReadExactly Method
Definition
Reads exactly length bytes from the stream, throwing EndOfStreamException if the end of the stream has been reached.
public static Byte[] ReadExactly(this Stream stream, int length);
Parameters
| Name | Type | Description |
|---|---|---|
| stream | Stream | |
| length | Int32 | The number of bytes to read. |
Returns
A byte array containing the bytes read from the stream.