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.StringThe name of the character set to obtain.
encoding
Type: System.Text.EncodingA Encoding object in which to store the result.
Return value
Type: System.Boolean
The TryGetEncoding method returns true if it is successful. Otherwise, it returns false.