EncodingGetCharCount Method (Byte, Int32) |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer.
Namespace: System.TextAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public virtual int GetCharCount(
byte* bytes,
int count
)
Parameters
- bytes
- Type: SystemByte*
A pointer to the first byte to decode. - count
- Type: SystemInt32
The number of bytes to decode.
Return Value
Type:
Int32The number of characters produced by decoding the specified sequence of bytes.
Exceptions Exception | Condition |
---|
ArgumentNullException | bytes is null. |
ArgumentOutOfRangeException | count is less than zero. |
DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for complete explanation)-and-DecoderFallback is set to DecoderExceptionFallback. |
See Also