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

System.IO.StreamReader.ReadToEnd Method

Reads the stream from the current position to the end of the stream. [Edit]

public override string ReadToEnd ()

Returns

A int containing the rest of the stream as a string, from the current position to the end. If the current position is at the end of the stream, returns the empty string (""). [Edit]

Exceptions

TypeReason
System.IO.IOExceptionAn I/O error occurred. [Edit]
OutOfMemoryExceptionThere is insufficient memory to allocate a buffer for the returned string. [Edit]

Remarks

Note:

This method overrides TextReader.ReadToEnd .

[Edit]

Requirements

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