BinaryReader.Read Method (Byte[], Int32, Int32)
Silverlight
Reads count bytes from the stream with index as the starting point in the byte array.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Parameters
- buffer
- Type: System.Byte[]
The buffer to read data into.
- index
- Type: System.Int32
The starting point in the buffer at which to begin reading into the buffer.
- count
- Type: System.Int32
The number of characters to read.
Return Value
Type: System.Int32The number of characters read into buffer. This might be less than the number of bytes requested if that many bytes are not available, or it might be zero if the end of the stream is reached.
| Exception | Condition |
|---|---|
| ArgumentException |
The buffer length minus index is less than count. |
| ArgumentNullException |
buffer is null. |
| ArgumentOutOfRangeException |
index or count is negative. |
| ObjectDisposedException |
The stream is closed. |
| IOException |
An I/O error occurs. |
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.