NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Decoder.GetCharCount

Determines the exact number of characters that will be produced by decoding a specified range of bytes, when implemented in a subclass.

[Visual Basic]
MustOverride Public Function GetCharCount( _
   ByVal bytes() As Byte, _
   ByVal index As Integer, _
   ByVal count As Integer _
) As Integer
[C#]
public abstract int GetCharCount(
   byte[] bytes,
   int index,
   int count
);
[C++]
public: virtual int GetCharCount(
   unsigned char* bytes[],
   int index,
   int count
) = 0;
[JScript]
public abstract function GetCharCount(
   bytes : Byte[],
   index : int,
   count : int
) : int;

Parameters

bytes
The byte array to decode.
index
The starting index of the byte array to decode.
count
The number of bytes to decode.

Return Value

The number of characters the next call to GetChars will produce if presented with the specified range of bytes. The returned value takes into account the state in which the decoder was left following the last call to GetChars.

Exceptions

Exception Type Condition
ArgumentNullException The bytes argument is null.
ArgumentOutOfRangeException The index and count arguments do not denote a valid range in the byte array.

Remarks

The state of the decoder is not affected by a call to this method.

See Also

Decoder Class | Decoder Members | System.Text Namespace