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

System.IO.TextReader.ReadLine Method

Reads a line of characters from the current character source.

public virtual string ReadLine ()

Returns

A string containing the next line from the input stream, or null if all lines have been read. The returned string does not contain the line terminating character.

Exceptions

TypeReason
System.IO.IOException An I/O error occurred.
OutOfMemoryExceptionThere is insufficient memory to allocate a buffer for the returned string.
ArgumentOutOfRangeExceptionThe number of characters in the next line is larger than int.MaxValue.

Remarks

A line is defined as a sequence of characters followed by a carriage return (0x000d), a line feed (0x000a), Environment.NewLine, or the end of stream marker.

Operation
As described above.

Requirements

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