Caution
0 is treated as an invalid argument. This behavior is different from that
of the Encoding class.
public static Encoding GetEncoding(
int codePage,
EncoderFallback encoderFallback,
DecoderFallback decoderFallback,
bool throwOnInvalidCodePage = false
)Public Shared Function GetEncoding (
codePage As Integer,
encoderFallback As EncoderFallback,
decoderFallback As DecoderFallback,
Optional throwOnInvalidCodePage As Boolean = false
) As Encodingpublic:
static Encoding^ GetEncoding(
int codePage,
EncoderFallback^ encoderFallback,
DecoderFallback^ decoderFallback,
bool throwOnInvalidCodePage = false
)static member GetEncoding :
codePage : int *
encoderFallback : EncoderFallback *
decoderFallback : DecoderFallback *
?throwOnInvalidCodePage : bool
(* Defaults:
let _throwOnInvalidCodePage = defaultArg throwOnInvalidCodePage false
*)
-> Encoding The code page number.
| ArgumentNullException | encoderFallback or decoderFallback is null. |
| ArgumentOutOfRangeException | codePage is less than 1 or greater than 65535. This exception is only thrown if the optional parameter throwOnInvalidCodePage is true. |
| ArgumentException | codePage could not be mapped to a Encoding object. This exception is only thrown if the optional parameter throwOnInvalidCodePage is true. |