Export (0) Print
Expand All

Console.InputEncoding Property

Gets or sets the encoding the console uses to read input.

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

public static Encoding InputEncoding { get; set; }

Property Value

Type: System.Text.Encoding
The encoding used to read console input.

ExceptionCondition
ArgumentNullException

The property value in a set operation is null.

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 input encoding to translate keyboard input into a corresponding character. The input encoding incorporates a code page that maps 256 keyboard character codes to individual characters. Different code pages include different special characters, typically customized for a language or a group of languages.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft