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.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
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.
Show: