Mono Class Library: System.IO.StringReader Overview | Members

System.IO.StringReader.Read Method

Reads a block of characters from the input string. [Edit]

public override int Read (char[] buffer, int index, int count)

Parameters

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 source. [Edit]
index
A int that specifies the starting index in the buffer. [Edit]
count
A int that specifies the number of characters to read. [Edit]

Returns

A int containing the total number of characters read into the buffer, or zero if the end of the underlying string has been reached. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionbuffer is null. [Edit]
ArgumentException(index + count ) > buffer.Length. [Edit]
ArgumentOutOfRangeException

index < 0

- or-

count < 0.

[Edit]
ObjectDisposedExceptionThe current reader is closed. [Edit]

Remarks

Note: This method overrides TextReader.Read.
[Edit]

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0