Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Console.OutputEncoding Property

Gets or sets the encoding the console uses to write output.

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

public static Encoding OutputEncoding { get; set; }
/** @property */
public static Encoding get_OutputEncoding ()

/** @property */
public static void set_OutputEncoding (Encoding value)

public static function get OutputEncoding () : Encoding

public static function set OutputEncoding (value : Encoding)

Not applicable.

Property Value

The encoding used to write console output.

Exception typeCondition

ArgumentNullException

The property value in a set operation is a null reference (Nothing in Visual Basic).

PlatformNotSupportedException

This property's set operation is not supported on Windows 98, Windows 98 Second Edition, or Windows Millennium Edition.

IOException

An error occurred during the execution of this operation.

SecurityException

Your application does not have permission to perform this operation.

The console uses the output encoding to translate characters written by an application into corresponding console display characters. The output encoding incorporates a code page that maps 256 characters to individual console display characters. Different code pages include different special characters, typically customized for a language or a group of languages.

Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft