Share via


Charset.TryGetEncoding method (Int32, Encoding)

The TryGetEncoding method attempts to put the Encoding object for the character set specified by the codePage parameter into the encoding out parameter.

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

Syntax

'Declaration
Public Shared Function TryGetEncoding ( _
    codePage As Integer, _
    <OutAttribute> ByRef encoding As Encoding _
) As Boolean
'Usage
Dim codePage As Integer
Dim encoding As Encoding
Dim returnValue As Boolean

returnValue = Charset.TryGetEncoding(codePage, _
    encoding)
public static bool TryGetEncoding(
    int codePage,
    out Encoding encoding
)

Parameters

Return value

Type: System.Boolean
The TryGetEncoding method returns true if it is successful. Otherwise, it returns false.

See also

Reference

Charset class

Charset members

TryGetEncoding overload

Microsoft.Exchange.Data.Globalization namespace