Version

GetCharCount Method

When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
Syntax
'Declaration
 
Function GetCharCount( _
   ByVal bytes() As Byte, _
   ByVal index As Integer, _
   ByVal count As Integer _
) As Integer
int GetCharCount( 
   byte[] bytes,
   int index,
   int count
)

Parameters

bytes
The byte array containing the sequence of bytes to decode.
index
The zero-based Index of the first byte to decode.
count
The number of bytes to decode.

Return Value

The number of characters produced by decoding the specified sequence of bytes.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionbytes is null.
System.ArgumentOutOfRangeExceptionindex or count is less than zero.-or- index and count do not denote a valid range in bytes.
System.Text.DecoderFallbackExceptionA fallback occurred (see Understanding Encodings for complete explanation).
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also