Reads a specified maximum number of characters from the current text reader and writes the data to a buffer, beginning at the specified index.
The number of characters that have been read. The number will be less than or equal to count, depending on whether all input characters have been read.
Type Reason ArgumentNullException buffer is null. ArgumentException (index + count - 1) > buffer.Length. ArgumentOutOfRangeException index < 0
- or-
count < 0.
System.IO.IOException An I/O error occurred.
The position of the underlying text reader is advanced by the number of characters that were read into buffer.
The method blocks until either count characters are read, or all characters have been read. This is a blocking version of TextReader.Read.