System.IO.TextWriter.WriteLine Method

Writes the text representation of an object by calling the ToString method on that object, followed by a line terminator to the text string or stream.

Syntax

public virtual void WriteLine (object value)

Parameters

value
The object to write. If value is null, only the line terminator is written.

Exceptions

TypeReason
System.IO.IOException An I/O error occurred.

Remarks

This overload is equivalent to the TextWriter.Write(string, object) overload. The TextWriter.FormatProvider property, if not null, specifies the culture-specific formatting.

The line terminator is defined by the TextWriter.CoreNewLine field.

For a list of common I/O tasks, see Common I/O Tasks.

Requirements

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