When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters starting at the specified character pointer. A parameter indicates whether to clear the internal state of the encoder after the calculation.
The number of bytes produced by encoding the specified characters and any characters in the internal buffer.
This method does not affect the state of the encoder.
To calculate the exact array size that Encoder.GetBytes(Char*, int, Byte*, int, bool) requires to store the resulting bytes, the application should use Encoder.GetByteCount(Char*, int, bool).
If GetBytes is called with flush set to false, the encoder stores trailing characters at the end of the data block in an internal buffer and uses them in the next encoding operation. The application should call GetByteCount on a block of data immediately before calling GetBytes on the same block, so that any trailing characters from the previous block are included in the calculation.