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 4.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.Text.Encoding

Represents a Unicode implementation of .

encodes each Unicode character in UTF-16, i.e. as two consecutive bytes. Both little-endian and big-endian encodings are supported.

On little-endian platforms such as Intel machines, it is generally more efficient to store Unicode characters in little-endian. However, many other platforms can store Unicode characters in big-endian. Unicode files can be distinguished by the presence of the byte order mark (U+FEFF), which is written as either 0xfe 0xff or 0xff 0xfe.

This implementation can detect a byte order mark automatically and switch byte orders, based on a parameter specified in the constructor.

ISO/IEC 10646 defines UCS-2 and UCS-4. UCS-4 is a four-byte (32-bit) encoding containing 231 code positions, divided into 128 groups of 256 planes. Each plane contains 216 code positions. UCS-2 is a two-byte (16-bit) encoding containing the 216 code positions of UCS-4 for which the upper two bytes are zero, known as Plane Zero or the Basic Multilingual Plane (BMP). For example, the code position for LATIN CAPITAL LETTER A in UCS-4 is 0x00000041 whereas in UCS-2 it is 0x0041.

ISO/IEC 10646 also defines UTF-16, which stands for "UCS Transformation Format for 16 Planes of Group 00". UTF-16 is a two byte encoding that uses an extension mechanism to represent 221 code positions. UTF-16 represents code positions in Plane Zero by its UCS-2 code value and code positions in Planes 1 through 16 by a pair of special code values, called surrogates. UTF-16 is equivalent to the Unicode Standard. For a detailed description of UTF-16 and surrogates, see "The Unicode Standard Version 3.0" Appendix C.

- Constructor

  Constructs and initializes a new instance of the class.

  The new instance uses little-endian encoding and includes the Unicode byte-order mark in conversions.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  A value that specifies the byte-ordering to use for the new instance. Specify to use big-endian ordering; specify to use little-endian ordering.
  A value that specifies whether to include the Unicode byte order mark in translated strings. Specify to include the Unicode byte-order mark; otherwise, specify .

  Constructs and initializes a new instance of the class using the specified Boolean flags.

  To be added.
  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  To be added.
  To be added.
  To be added.
  To be added.
  To be added.
  2.0.0.0
  4.0.0.0
- Field
  System.Int32 2 To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` The to compare to the current instance.

  Determines whether the current instance and the specified represent the same type and value.

  if represents the same type and value as the current instance. If is a null reference or is not an instance of , returns .

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` A to encode as Unicode-encoded characters.

  Returns the number of bytes required to encode the specified string as Unicode-encoded characters.

  A containing the number of bytes needed to encode as Unicode-encoded characters.

  This method overrides .

  is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32 `` `` `` A array to encode as Unicode-encoded characters. A that specifies the first index of to encode. A that specifies the number of elements in to encode.

  Determines the exact number of bytes required to encode the specified range of the specified array of characters as Unicode-encoded characters.

  A whose value equals the number of bytes required to encode the range in from to + - 1 as Unicode-encoded characters.

  This method overrides .

  is .

  < 0.

  -or-

  < 0.

  -or-

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

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Byte[] `` A to encode as Unicode-encoded characters.

  Encodes the specified string as Unicode-encoded characters.

  A array containing the encoded representation of as Unicode-encoded characters.

  This method overrides .

  is . 0 1.0.5000.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 4.0.0.0 System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32 `` `` `` `` `` A array of characters to encode as Unicode-encoded characters. A that specifies the first index of to encode. A that specifies the number of elements in to encode. A array to encode into. A that specifies the first index of to encode into.

  Encodes the specified range of the specified character array into the specified range of the specified byte array as Unicode-encoded characters.

  A containing the number of bytes encoded into as Unicode-encoded characters.

  This method overrides .

  can be used to determine the exact number of bytes that will be produced for a given range of characters. Alternatively, can be used to determine the maximum number of bytes that will be produced for a given number of characters, regardless of the actual character values.

  does not contain sufficient space to store the encoded 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
  4.0.0.0
- Method
  System.Int32 `` `` `` `` `` A to encode as Unicode-encoded characters. A that specifies the first index of from which to encode. A that specifies the number of elements in to encode. A array to encode into. A that specifies the first index of to encode into.

  Encodes the specified range of the specified string into the specified range of the specified array of bytes as Unicode-encoded characters.

  A whose value equals the number of bytes encoded into as Unicode-encoded characters.

  This method overrides .

  does not contain sufficient space to store the encoded 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
  4.0.0.0
- Method
  System.Int32 `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32 `` `` `` A array to decode as Unicode-encoded characters. A that specifies the first index in to decode. A that specifies the number of 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 as Unicode-encoded characters.

  A whose value equals the number of characters a call to will produce if presented with the specified range of as Unicode-encoded characters.

  This method overrides .

  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
  4.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 4.0.0.0 System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32 `` `` `` `` `` A array to decode as Unicode-encoded characters. A that specifies the first index of from which to decode. A that specifies the number of elements in to decode. A array 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 as Unicode-encoded characters.

  A containing the number of characters decoded into as Unicode-encoded characters.

  This method overrides .

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

  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
  4.0.0.0
- Method
  System.Text.Decoder

  Returns a object for the current instance.

  A object for the current instance.

  This method overrides .

  Unlike the method, the method provided by a object can convert partial sequences of bytes into partial sequences of characters by maintaining the appropriate state between the conversions.

  This implementation returns a decoder that simply forwards calls to and to the corresponding methods of the current instance. It is recommended that encoding implementations that requires state to be maintained between successive conversions override this method and return an instance of an appropriate decoder implementation.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Text.Encoder To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Int32

  Generates a hash code for the current instance.

  A containing the hash code for the current instance.

  The algorithm used to generate the hash code is unspecified.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` A whose value represents a number of characters to encode as Unicode-encoded characters.

  Returns the maximum number of bytes required to encode the specified number of characters as Unicode-encoded characters, regardless of the actual character values.

  A containing the maximum number of bytes required to encode characters as Unicode-encoded characters.

  This method overrides .

  Use this method to determine an appropriate minimum buffer size for byte arrays passed to or for the current instance. Using this minimum buffer size can help ensure that buffer overflow exceptions do not occur.

  < 0.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` A specifies the number of bytes to decode as Unicode-encoded characters.

  Returns the maximum number of characters produced by decoding the specified number of bytes as Unicode-encoded characters, regardless of the actual byte values.

  A containing the maximum number of characters that would be produced by decoding bytes as Unicode-encoded characters.

  This method overrides .

  Use this method to determine an appropriate minimum buffer size for byte arrays passed to or for the current instance. Using this minimum buffer size can help ensure that no buffer overflow exceptions will occur.

  < 0.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Byte[]

  Returns the bytes used at the beginning of a instance to determine which implementation the stream was created with.

  A array that identifies the implementation used to create a .

  returns the Unicode byte order mark (U+FEFF) in either big-endian or little-endian order, according the ordering that the current instance was initialized with.

  This method overrides .

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