Mono Class Library: System.IO.StreamReader Overview | MembersSystem.IO.StreamReader.Read Method |
Reads a maximum of count characters from the current stream into buffer, beginning at index. [Edit]
|
- buffer
- A char array. 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 instance. [Edit]
- index
- A int that specifies the index of buffer at which to begin writing. [Edit]
- count
- A int that specifies the maximum number of characters to read. [Edit]
A int containing the number of characters that have been read, or zero if there are no more characters left to read. Can be less than count if the end of the stream has been reached. [Edit]
Type Reason ArgumentException buffer .Length - index < count . [Edit] ArgumentNullException buffer is null. [Edit] ArgumentOutOfRangeException index or count is negative. [Edit] System.IO.IOException An I/O error occurred.
-or-
The current stream is closed.
[Edit]
Note:[Edit]This method returns after either count characters are read, or the end of the file is reached. TextReader.ReadBlock(Char[], int, int) is a blocking version of StreamReader.Read .
This method overrides TextReader.Read.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0