Share via


Charset.TryGetEncoding method (String, Encoding)

The TryGetEncoding method attempts to get a Encoding object for the character set specified by the name parameter.

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

Syntax

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

returnValue = Charset.TryGetEncoding(name, _
    encoding)
public static bool TryGetEncoding(
    string name,
    out Encoding encoding
)

Parameters

  • name
    Type: System.String

    The name of the character set to obtain.

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