Click or drag to resize
TextReaderReadToEnd Method
Reads all characters from the current position to the end of the TextReader and returns them as one string.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual string ReadToEnd()

Return Value

Type: String
A string containing all characters from the current position to the end of the TextReader.
Exceptions
ExceptionCondition
IOExceptionAn I/O error occurs.
ObjectDisposedExceptionThe TextReader is closed.
OutOfMemoryExceptionThere is insufficient memory to allocate a buffer for the returned string.
ArgumentOutOfRangeExceptionThe number of characters in the next line is larger than MaxValue
See Also