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!

TextReader.Read (Char[], Int32, Int32)

Reads a maximum of count characters from the current stream and writes the data to buffer, beginning at index.

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

Parameters

buffer
The character array to write data to.
index
The place in buffer at which to begin writing.
count
The maximum number of characters to read.

Return Value

The number of characters that have been read. The number will be less than or equal to count, depending on whether the data is available within the stream.

Exceptions

Exception Type Condition
ArgumentNullException buffer is a null reference (in Visual Basic Nothing).
ArgumentException The buffer length minus index is less than count.
ArgumentOutOfRangeException index or count is negative.
IOException An I/O error occurs.

Remarks

This method returns after either count characters are read or the end of the file is reached. ReadBlock is a blocking version of this method.

See Also

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