BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object

Converts blocks of bytes into blocks of characters, maintaining state across successive calls for reading from a .

Following instantiation of a decoder, sequential blocks of bytes are converted into blocks of characters through calls to the method. The decoder maintains state between the conversions, allowing it to correctly decode a character whose bytes span multiple blocks. This greatly assists decoding streams of bytes into characters. An instance of a specific implementation of the class is typically obtained through a call to the method of a object.

The following example demonstrates using the implementation of the class to convert two byte arrays to a character array, where one character's bytes span multiple byte arrays. This demonstrates how to use a in streaming-like situations.

`using System; using System.Text; public class DecoderExample { public static void Main() { // These bytes in UTF-8 correspond to 3 different // Unicode characters - A (U+0041), # (U+0023), // and the biohazard symbol (U+2623). Note the // biohazard symbol requires 3 bytes in UTF-8 // (in hex, e2, 98, a3). Decoders store state across // multiple calls to GetChars, handling the case // when one char spans multiple byte arrays. byte[] bytes1 = { 0x41, 0x23, 0xe2 }; byte[] bytes2 = { 0x98, 0xa3 }; char[] chars = new char[3]; Decoder d = Encoding.UTF8.GetDecoder(); int charLen = d.GetChars(bytes1, 0, bytes1.Length, chars, 0); // charLen is 2. charLen += d.GetChars(bytes2, 0, bytes2.Length, chars, charLen); // charLen is now 3. foreach(char c in chars) Console.Write("U+{0:x} ", (ushort)c); } }`

The output is

U+41 U+23 U+2623

- Constructor

  Constructs a new instance of the class.

  This constructor is called only by classes that inherit from the class.

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Void `` `` `` `` `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Property
  System.Runtime.InteropServices.ComVisible(false)
  System.Text.DecoderFallback To be added. To be added. To be added. 2.0.0.0
- Property
  System.Runtime.InteropServices.ComVisible(false)
  System.Text.DecoderFallbackBuffer To be added. To be added. To be added. 2.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32 `` `` `` A array to decode. A that specifies the first index in to decode. A that specifies the number elements in to decode.

  Determines the exact number of characters that will be produced by decoding the specified range of the specified array of bytes.

  A containing the number of characters the next call to will produce if presented with the specified range of .

  This value takes into account the state in which the current instance was left following the last call to . This contrasts with , which does not maintain state information across subsequent calls.

  As described above.

  Override this method to return the appropriate value for a particular encoding.

  Use this method to determine the appropriate size of a buffer to contain the decoded values.

  is .

  < 0.

  -or-

  < 0.

  -or-

  and do not specify a valid range in (i.e. ( + ) > .Length).

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Int32 `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32 `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32 `` `` `` `` `` A array to decode. A that specifies the first index of from which to decode. A that specifies the number elements in to decode. A array of characters to decode into. A that specifies the first index of to store the decoded bytes.

  Decodes the specified range of the specified array of bytes into the specified range of the specified array of characters for a particular encoding.

  A containing the number of characters decoded into for a particular encoding.

  can be used to determine the exact number of characters that will be produced for a specified range of bytes. Alternatively, of the object that produced the current instance can be used to determine the maximum number of characters that might be produced for a specified number of bytes, regardless of the actual byte values.

  As described above.

  Override this method to decode the values of a array for a particular encoding.

  Use this method to decode the elements of a byte array for a particular encoding.

  does not contain sufficient space to store the decoded characters.

  is .

  -or-

  is .

  < 0.

  -or-

  < 0.

  -or-

  < 0.

  -or-

  and do not specify a valid range in (i.e. (+ ) > .Length).

  -or-

  > .Length.

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Int32 `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Void To be added. To be added. 2.0.0.0 System.Runtime.InteropServices.ComVisible(false)
0 System.Runtime.InteropServices.ComVisible(true)