Click or drag to resize
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.Text
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual int GetCharCount(
	byte[] bytes
)

Parameters

bytes
Type: SystemByte
The byte array containing the sequence of bytes to decode.

Return Value

Type: Int32
The number of characters produced by decoding the specified sequence of bytes.
Exceptions
ExceptionCondition
ArgumentNullExceptionbytes is null.
DecoderFallbackExceptionA fallback occurred (see Character Encoding in the .NET Framework for complete explanation)-and-DecoderFallback is set to DecoderExceptionFallback.
See Also