When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
The number of characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.
Type Reason ArgumentNullException bytes is null . ArgumentOutOfRangeException index < 0.
-or-
count < 0.
-or-
index and count do not specify a valid range in bytes (i.e. (index + count) > bytes.Length).
This method does not affect the state of the decoder.
To calculate the exact array size that Decoder.GetChars(Byte[], int, int, Char[], int) requires to store the resulting characters, the application should use Decoder.GetCharCount(Byte[], int, int).
If GetChars is called with flush set to false, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call GetCharCount on a block of data immediately before calling GetChars on the same block, so that any trailing bytes from the previous block are included in the calculation.