TextWriter.Encoding Property
When overridden in a derived class, returns the Encoding in which the output is written.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Syntax
public virtual abstract Encoding Encoding { get; }
Property Value
The Encoding in which the output is written.
Remarks
This property is necessary for some XML scenarios where a header must be written containing the encoding used by the TextWriter. This allows the XML code to consume an arbitrary TextWriter and generate the correct XML header.
Version Information
Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.