WriteLine Method (String)

TextWriter.WriteLine Method (String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Writes a string followed by a line terminator to the text stream.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

public virtual void WriteLine(
	string value


Type: System.String
The string to write. If value is null, only the line termination characters are written.


The TextWriter is closed.


An I/O error occurs.

This version of WriteLine is equivalent to Write.

The line terminator string is defined by the NewLine property.

This method does not search the specified String for individual newline characters (hexadecimal 0x000a) and replace them with NewLine.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2016 Microsoft