Mono Class Library: System.Text.Encoding Overview | MembersSystem.Text.Encoding.GetMaxCharCount Method |
Returns the maximum number of characters produced by decoding the specified number of bytes, regardless of the actual byte values. [Edit]
|
A int containing the maximum number of characters that would be produced by decoding byteCount bytes. [Edit]
Operation
As described above.Note to Inheritors
This method is overridden by types derived from System.Text.Encoding to return the appropriate number of bytes for the particular encoding.Usage
Encoding.GetMaxCharCount(int) can be used to determine the minimum buffer size for byte arrays passed to the Encoding.GetChars(Byte[]) of the current encoding. Using this minimum buffer size ensures that no buffer overflow exceptions will occur. [Edit]
Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0