PTextReader.ReadBlock(Char[], Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads a maximum of count characters from the current stream and writes the data to buffer, beginning at index.
public:
override int ReadBlock(cli::array <char> ^ buffer, int index, int count);
public override int ReadBlock (char[] buffer, int index, int count);
override this.ReadBlock : char[] * int * int -> int
Public Overrides Function ReadBlock (buffer As Char(), index As Integer, count As Integer) As Integer
Parameters
- buffer
- Char[]
When this method returns, this parameter 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.
Returns
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.
Exceptions
An I/O error occurs.
index or count is negative.
The buffer length minus index is less than count.
buffer is null.
The TextReader is closed.