Share via


Charset.GetEncoding method (Int32)

The GetEncoding method returns an Encoding object for the specified code page.

Namespace:  Microsoft.Exchange.Data.Globalization
Assembly:  Microsoft.Exchange.Data.Common (in Microsoft.Exchange.Data.Common.dll)

Syntax

'Declaration
Public Shared Function GetEncoding ( _
    codePage As Integer _
) As Encoding
'Usage
Dim codePage As Integer
Dim returnValue As Encoding

returnValue = Charset.GetEncoding(codePage)
public static Encoding GetEncoding(
    int codePage
)

Parameters

  • codePage
    Type: System.Int32

    The code page for which an encoding is desired.

Return value

Type: System.Text.Encoding

Exceptions

Exception Condition
InvalidCharsetException

The code page specified by the codePage parameter is invalid or is not installed.

See also

Reference

Charset class

Charset members

GetEncoding overload

Microsoft.Exchange.Data.Globalization namespace