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
codePage
Type: System.Int32The code page for which to obtain an Encoding.
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.