Encoding Property
Collapse the table of content
Expand the table of content

XDeclaration.Encoding Property

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

Gets or sets the encoding for this document.

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

'Declaration
Public Property Encoding As String

Property Value

Type: System.String
A String containing the code page name for this document.

Any value returned by WebName is a valid value.

If you read an encoded document, then this property will be set to the code page name.

If you set this property to a valid code page name, then when serializing, LINQ to XML will serialize with the specified encoding.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft