EncodingGetCharCount Method (Byte) |
When overridden in a derived class, calculates the number of characters produced by decoding all the bytes in the specified byte array.
Namespace: System.TextAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public virtual int GetCharCount(
byte[] bytes
)
Parameters
- bytes
- Type: SystemByte
The byte array containing the sequence 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. |
DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for complete explanation)-and-DecoderFallback is set to DecoderExceptionFallback. |
See Also