Click or drag to resize
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.Text
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
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: Int32
The number of characters produced by decoding the specified sequence of bytes.
Exceptions
ExceptionCondition
ArgumentNullExceptionbytes is null.
ArgumentOutOfRangeExceptioncount is less than zero.
DecoderFallbackExceptionA fallback occurred (see Character Encoding in the .NET Framework for complete explanation)-and-DecoderFallback is set to DecoderExceptionFallback.
See Also