Encoding Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

When overridden in a derived class, returns the character encoding in which the output is written.

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

public abstract Encoding Encoding { get; }

Property Value

Type: System.Text..::..Encoding
The character encoding in which the output is written.

This property is necessary for some XML scenarios where a header must be written containing the encoding used by the TextWriter. This enables the XML code to consume an arbitrary TextWriter and generate the correct XML header.

Show: