NewLineChars Property

XmlWriterSettings.NewLineChars Property

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

Gets or sets the character string to use for line breaks.

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

'Declaration
Public Property NewLineChars As String

Property Value

Type: System.String
The character string to use for line breaks. This can be set to any string value. However, to ensure valid XML, you should specify only valid white space characters, such as space characters, tabs, carriage returns, or line feeds. The default is \r\n (carriage return, new line).

ExceptionCondition
ArgumentNullException

The value assigned to the NewLineChars is Nothing.

This property only applies to XmlWriter instances that output text content; otherwise, this setting is ignored. The XmlWriter throws an exception if the line break characters would result in invalid XML.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft