Decodes the specified range of the specified byte array into the specified range of the specified char array.
The number of characters stored in chars.
Type Reason ArgumentException chars does not contain sufficient space to store the decoded characters. ArgumentNullException bytes is null .
-or-
chars is null .
ArgumentOutOfRangeException byteIndex < 0.
-or-
byteCount < 0.
-or-
charIndex < 0.
-or-
byteIndex and byteCount do not specify a valid range in bytes (i.e. (byteIndex + byteCount ) > bytes.Length).
-or-
charIndex > chars.Length.
Operation
This method requires the caller to provide the destination buffer and ensure that the buffer is large enough to hold the entire result of the conversion.
Note to Inheritors
This method is overridden by types derived from System.Text.Encoding to perform the particular decoding.Usage
When using this method directly on a System.Text.Encoding object or on an associated System.Text.Decoder or System.Text.Encoder, use Encoding.GetCharCount(Byte[]) or Encoding.GetMaxCharCount(int) to allocate destination buffers.
Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0