NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

BinaryReader.Read (Byte[], Int32, Int32)

Reads a block of bytes from the current stream into a byte array and advances the current position by count bytes.

[Visual Basic]
Overloads Overridable Public Function Read( _
   ByVal buffer() As Byte, _
   ByVal index As Integer, _
   ByVal count As Integer _
) As Integer
[C#]
public virtual int Read(
   byte[] buffer,
   int index,
   int count
);
[C++]
public: virtual int Read(
   unsigned char* buffer[],
   int index,
   int count
);
[JScript]
public function Read(
   buffer : Byte[],
   index : int,
   count : int
) : int;

Parameters

buffer
The buffer to read data into.
index
The starting position in the buffer at which to begin reading.
count
The number of characters to read.

Return Value

The number of characters read into buffer. This may be less than the number of bytes requested if that many bytes are not available, or it may be zero if the end of the stream is reached.

Exceptions

Exception Type Condition
ArgumentException The buffer length minus index is less than count.
ArgumentNullException buffer is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException index or count is negative.
IOException The stream is a null reference (Nothing) or closed.

See Also

BinaryReader Class | BinaryReader Members | System.IO Namespace | BinaryReader.Read Overload List