Gets or sets the text encoding to use.
Assembly: System.Xml (in System.Xml.dll)
This property only applies to XmlWriter instances that output text content to a stream; otherwise, this setting is ignored. The XmlWriter encodes a buffer of characters at a time, rather than character by character. An exception is thrown when the Flush method is called if any encoding errors are encountered.
This property is overridden by the encoding of the underlying writer. For example, if this property is set to Unicode for a particular XmlWriter, but the underlying writer is a StreamWriter with encoding set to UTF8, the output will be UTF8 encoded.
Do not accept an Encoding object from an untrusted source.
For more information and code examples, see XML Data.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.