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!

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

Reads a block of characters.

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

Parameters

buffer
The character array to read data into.
index
The starting index in the buffer.
count
The number of characters to read.

Return Value

The total number of characters read into the buffer. This may be less than the number of characters requested if that many characters are not currently available, or zero if the end of the underlying string is reached.

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

The method will read up to count characters from the StringReader into the buffer character array starting at position index. Returns the actual number of characters read, or zero if the end of the string is reached.

See Also

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