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;
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.
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. |
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.
StringReader Class | StringReader Members | System.IO Namespace | StringReader.Read Overload List