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

System.IO.StreamReader.ReadLine Method

Reads a line of characters from the current stream and returns the data as a string. [Edit]

public override string ReadLine ()

Returns

A string containing the next line from the input stream, or null if the end of the input stream is reached. [Edit]

Exceptions

TypeReason
System.IO.IOExceptionAn I/O error occurred. [Edit]
OutOfMemoryExceptionThere is insufficient memory to allocate a buffer for the returned string. [Edit]

Remarks

Note:

This method defines a line as a sequence of characters followed by a carriage return (hexadecimal 0x000d), a line feed (hexadecimal 0x000a), or Environment.NewLine. The returned string does not contain the terminating character(s).

This method overrides TextReader.ReadLine.

[Edit]

Requirements

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