Reads a line of characters from the current stream and returns the data as a string.
[Visual Basic] Overridable Public Function ReadLine() As String [C#] public virtual string ReadLine(); [C++] public: virtual String* ReadLine(); [JScript] public function ReadLine() : String;
The next line from the input stream, or null if the end of the input stream has been reached.
Exception Type | Condition |
---|---|
IOException | An I/O error occurs. |
A line is defined as a sequence of characters followed by a carriage return (\r), a line feed (\n), or a carriage return immediately followed by a line feed (\r\n). The string that is returned does not contain the terminating carriage return and/or line feed. The returned value is null if the end of the input stream has been reached.