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

System.IO.TextReader.ReadToEnd Method

Reads all characters from the current position in the character source to the end of the source.

public virtual string ReadToEnd ()

Returns

A string containing all characters from the current position to the end of the character source.

Exceptions

TypeReason
System.IO.IOException An I/O error occurred.
OutOfMemoryExceptionThere is insufficient memory to allocate a buffer for the returned string.
ArgumentOutOfRangeExceptionThe number of characters from the current position to the end of the underlying stream is larger than int.MaxValue.

Remarks

Operation
As described above.

Requirements

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