Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

TextWriter.NewLine Property

Gets or sets the line terminator string used by the current TextWriter.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)
public virtual string NewLine { get; set; }

Property Value

Type: System.String
The line terminator string for the current TextWriter.

The default line terminator string is a carriage return followed by a line feed ("\r\n").

The line terminator string is written to the text stream whenever one of the WriteLine methods is called. In order for text written by the TextWriter to be readable by a TextReader, only "\n" or "\r\n" should be used as terminator strings. If NewLine is set to null, the default newline character is used instead.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.