Click or drag to resize
StreamReaderReadToEnd Method
Reads the stream from the current position to the end of the stream.

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

Return Value

Type: String
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 an empty string ("").
Exceptions
ExceptionCondition
OutOfMemoryExceptionThere is insufficient memory to allocate a buffer for the returned string.
IOExceptionAn I/O error occurs.
See Also