| TextReaderReadToEnd Method |
Reads all characters from the current position to the end of the TextReader and returns them as one string.
Namespace: System.IOAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntaxpublic virtual string ReadToEnd()
Return Value
Type:
StringA string containing all characters from the current position to the end of the TextReader.
Exceptions| Exception | Condition |
|---|
| IOException | An I/O error occurs. |
| ObjectDisposedException | The TextReader is closed. |
| OutOfMemoryException | There is insufficient memory to allocate a buffer for the returned string. |
| ArgumentOutOfRangeException | The number of characters in the next line is larger than MaxValue |
See Also