Mono Class Library: System.IO.StreamWriter Overview | Members

System.IO.StreamWriter.Encoding Property

Gets the System.Text.Encoding in which the output is written. [Edit]

public override System.Text.Encoding Encoding { get; }

Value

The System.Text.Encoding specified in the constructor for the current instance, or System.Text.UTF8Encoding if an encoding was not specified. [Edit]

Remarks

Note: This property overrides the TextWriter.Encoding property.

Operation
As described above.

Usage
This property is required in some XML scenarios where a header must be written containing the encoding used by the System.IO.StreamWriter. This allows XML code to consume an arbitrary System.IO.StreamWriter and generate a correct XML header.

[Edit]

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0