Reads a maximum of count characters from the current stream and writes the data to buffer, beginning at index.
Declaration Syntax
Parameters
- buffer (array<Char>[]()[][])
- When this method returns, contains the specified character array with the values between index and (index + count - 1) replaced by the characters read from the current source.
- index (Int32)
- The place in buffer at which to begin writing.
- count (Int32)
- The maximum number of characters to read. If the end of the stream is reached before count of characters is read into buffer, the current method returns.
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. This method returns zero if called when no more characters are left to read.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | buffer is null. |
ArgumentException | The buffer length minus index is less than count. |
ArgumentOutOfRangeException | index or count is negative. |
ObjectDisposedException | The TextReader is closed. |
IOException | An I/O error occurs. |
Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: 5.0.0.4238