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 This type is safe for multithreaded operations. System.Object System.ICloneable

Represents a character encoding.

Characters are abstract entities that can be represented using many different character schemes or codepages. For example, Unicode UTF-16 encoding represents, or encodes, characters as sequences of 16-bit integers while Unicode UTF-8 represents the same characters as sequences of 8-bit bytes.

The BCL includes the following types derived from :

- encodes Unicode characters as 7-bit ASCII characters. This encoding only supports code points between U+0000 and U+007F inclusive.

- encodes each Unicode character as two consecutive bytes. Both little-endian and big-endian byte orders are supported.

- encodes Unicode characters using the UTF-8 (UCS Transformation Format, 8-bit form) encoding. This encoding supports all Unicode character values.

An application can use the properties of this class such as , , , and to obtain encodings. Applications can initialize new instances of objects through the , , and classes.

Through an encoding, the method is used to convert arrays of Unicode characters to arrays of bytes, and the method is used to convert arrays of bytes to arrays of Unicode characters. The and methods maintain no state between conversions. When the data to be converted is only available in sequential blocks (such as data read from a stream) or when the amount of data is so large that it needs to be divided into smaller blocks, an application can choose to use a or a to perform the conversion. Decoders and encoders allow sequential blocks of data to be converted and they maintain the state required to support conversions of data that spans adjacent blocks. Decoders and encoders are obtained using the and methods.

The core and methods require the caller to provide the destination buffer and ensure that the buffer is large enough to hold the entire result of the conversion. When using these methods, either directly on a object or on an associated or , an application can use one of two methods to allocate destination buffers.

The and methods can be used to compute the exact size of the result of a particular conversion, and an appropriately sized buffer for that conversion can then be allocated.

The and methods can be used to compute the maximum possible size of a conversion of a given number of characters or bytes, regardless of the actual character or byte values, and a buffer of that size can then be reused for multiple conversions.

The first method generally uses less memory, whereas the second method generally executes faster.

- Constructor

  Constructs a new instance of the class.

  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.
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Text.Encoding

  Gets an encoding for the ASCII (7-bit) character set.

  To be added.

  This property is read-only.

  ASCII characters can represent Unicode characters from U+0000 to U+007f, inclusive.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Text.Encoding

  Gets an encoding for the Unicode format in big-endian byte order.

  A for the Unicode format in big-endian byte order.

  This property is read-only.

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

  This encoding automatically detects a byte order mark and, if necessary, switches byte orders.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Object To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Property
  System.Int32 To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Byte[] `` `` `` The that is in. The desired for the returned array. The array containing the values to convert.

  Converts the specified array from one specified encoding to another specified encoding.

  A array containing the result of the conversion.

  To be added. , or is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Byte[] `` `` `` `` `` The that is in. The desired for the returned array. The array containing the values to convert. A containing the first index of from which to convert. A containing the number of bytes to convert.

  Converts the specified range of the specified array from one specified encoding to another specified encoding.

  A array containing the result of the conversion.

  To be added.

  , , or is .

  and do not denote a valid range in . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Runtime.InteropServices.ComVisible(false)
  System.Text.DecoderFallback To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Property
  System.Text.Encoding

  Gets an encoding for the ANSI code page of the current system.

  A for the ANSI code page of the current system.

  This property is read-only.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Runtime.InteropServices.ComVisible(false)
  System.Text.EncoderFallback To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Property
  System.String To be added. 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 `` The array to encode.

  Returns the number of bytes required to encode the specified array.

  A containing the number of bytes needed to encode .

  As described above.

  This method is overridden by types derived from to return the appropriate number of bytes for the particular encoding.

  can be used to determine the exact number of bytes that will be produced from encoding the given array of characters. An appropriately sized buffer for that conversion can then be allocated.

  Alternatively, can be used to determine the maximum number of bytes that will be produced from converting a given number of characters, regardless of the actual character values. A buffer of that size can then be reused for multiple conversions.

  generally uses less memory and generally executes faster.

  is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` The to decode.

  Returns the number of bytes required to encode the specified .

  A containing the number of bytes needed to encode .

  As described above.

  This method is overridden by types derived from to return the appropriate number of bytes for the particular encoding.

  can be used to determine the exact number of bytes that will be produced from encoding the given . An appropriately sized buffer for that conversion can then be allocated.

  Alternatively, can be used to determine the maximum number of bytes that will be produced from converting a given number of characters, regardless of the actual character values. A buffer of that size can then be reused for multiple conversions.

  generally uses less memory and generally executes faster.

  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 `` `` `` The array to encode. A containing the first index of to encode. A containing the number of characters to encode.

  Returns the number of bytes required to encode the specified range of characters in the specified Unicode character array.

  A containing the number of bytes required to encode the range in from to + - 1.

  As described above.

  This method is overridden by types derived from to return the appropriate number of bytes for the particular encoding.

  can be used to determine the exact the number of bytes that will be produced from encoding a given range of characters. An appropriately sized buffer for that conversion can then be allocated.

  Alternatively, can be used to determine the maximum number of bytes that will be produced from converting a given number of characters, regardless of the actual character values. A buffer of that size can then be reused for multiple conversions.

  generally uses less memory and generally executes faster.

  is .

  The number of bytes required to encode the specified elements in is greater than .

  -or-

  or is less than zero.

  -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.Byte[] `` The array to encode.

  Encodes the specified array.

  A array containing the encoded representation of .

  As described above.

  This method is overridden by types derived from to perform the encoding.

  is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Byte[] `` The to encode.

  Encodes the specified .

  A array containing the encoded representation of .

  As described above.

  This method is overridden by types derived from to perform the encoding.

  is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Byte[] `` `` `` The array to encode. A containing the first index of to encode. A containing the number of characters to encode.

  Encodes the specified range of the specified array.

  A array containing the encoded representation of the range in from to + - 1.

  As described above.

  This method is overridden by types derived from to perform the encoding.

  is . and do not denote a valid range in . 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 encode. A containing the first index of to encode. A containing the number of characters to encode. A array to encode into. A containing the first index of to encode into.

  Encodes the specified range of the specified array into the specified range of the specified array.

  The number of bytes encoded into .

  As described above.

  This method is overridden by types derived from to perform the encoding.

  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-

  (.Length - ) < .

  -or-

  > .Length.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` `` `` A to encode. A containing the first index of from which to encode. A containing the number of characters of to encode. The array to encode into. A containing the first index of to encode into. To be added. To be added. To be added. To be added.

  Encodes the specified range of the specified into the specified range of the specified array.

  A containing the number of bytes encoded into .

  As described above.

  This method is overridden by types derived from to perform the encoding.

  does not contain sufficient space to store the encoded characters.

  is .

  -or-

  is .

  < 0.

  -or-

  < 0.

  -or-

  < 0.

  -or-

  (.Length - ) < .

  -or-

  >= .Length.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` The array to decode.

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

  A containing the number of characters produced by decoding .

  As described above.

  This method is overridden by types derived from to return the appropriate number of bytes for the particular encoding.

  Use to determine the exact number of characters that will be produced from converting a given byte array. An appropriately sized buffer for that conversion can then be allocated.

  Alternatively, use to determine the maximum number of characters that will be produced for a given number of bytes, regardless of the actual byte values. A buffer of that size can then be reused for multiple conversions.

  generally uses less memory and generally executes faster.

  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 `` `` `` The array to decode. The first index in to decode. The number of bytes to decode.

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

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

  As described above.

  This method is overridden by types derived from to return the appropriate number of bytes for the particular encoding.

  Use to determine the exact number of characters that will be produced from converting a given range of bytes. An appropriately sized buffer for that conversion can then be allocated.

  Alternatively, use to determine the maximum number of characters that will be produced for a given number of bytes, regardless of the actual byte values. A buffer of that size can then be reused for multiple conversions.

  generally uses less memory and generally executes faster.

  is . 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.Char[] `` The array to decode.

  Decodes a array.

  A array produced by decoding

  .

  To be added. is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Char[] `` `` `` The array to decode. A containing the first index of to decode. A containing the number of bytes to decode.

  Decodes the specified range of the specified array.

  A array containing the decoded representation of the range in between to + .

  To be added. is . and do not denote a valid range in the byte array. 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 `` `` `` `` `` The array to decode. A containing the first index of to decode. A containing the number of bytes to decode. The array to decode into. A containing the first index of to decode into.

  Decodes the specified range of the specified array into the specified range of the specified array.

  The number of characters stored in .

  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.

  This method is overridden by types derived from to perform the particular decoding.

  When using this method directly on a object or on an associated or , use or to allocate destination buffers.

  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 for the current instance.

  A for the current instance.

  As described above.

  The default implementation returns a that forwards calls made to the and methods to the corresponding methods of the current instance.

  Encoding that requires state to be maintained between successive conversions should override this method and return an instance of an appropriate implementation.

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

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Text.Encoder

  Returns a for the current instance.

  A for the current encoding.

  As described above.

  The default implementation returns a that forwards calls made to the and methods to the corresponding methods of the current instance.

  Types derived from override this method to return an instance of an appropriate .

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

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Text.Encoding `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Text.Encoding `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Text.Encoding `` `` `` 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
- Method
  System.Text.Encoding `` `` `` 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
- Method
  System.Text.EncodingInfo[] To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- 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 containing the number of characters to encode.

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

  A containing the maximum number of bytes required to encode characters.

  As described above.

  This method is overridden by types derived from to return the appropriate number of bytes for the particular encoding.

  can be used to determine the minimum buffer size for byte arrays passed to the of the current encoding. Using this minimum buffer size ensures that no buffer overflow exceptions occur.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` A containing the number of bytes to decode.

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

  A containing the maximum number of characters that would be produced by decoding bytes.

  As described above.

  This method is overridden by types derived from to return the appropriate number of bytes for the particular encoding.

  can be used to determine the minimum buffer size for byte arrays passed to the of the current encoding. Using this minimum buffer size ensures that no buffer overflow exceptions will occur.

  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 to determine which the stream was created with.

  A array that identifies the encoding used on a stream.

  The preamble can be the Unicode byte order mark (U+FEFF written in the appropriate encoding) or any other type of identifying marks. This method can return an empty array.

  As described above.

  The default implementation returns an empty array.

  Override this method to return a array containing the preamble appropriate for the type derived from .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` The array to decode.

  Decodes the specified array.

  A containing the decoded representation of .

  As described above.

  This method is overridden by particular character encodings.

  is . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` `` The array to decode. A containing the starting index of to decode. A containing the number of bytes to decode.

  Decodes the specified range of the specified array.

  A containing the decoded representation of the range of from to + .

  As described above.

  This method is overridden by particular character encodings.

  is . and do not denote a valid range in . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Boolean `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Runtime.InteropServices.ComVisible(false)
  System.Boolean To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Property
  System.Runtime.InteropServices.ComVisible(false)
  System.Boolean To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Property
  System.Text.Encoding

  Gets an encoding for the Unicode format in little-endian byte order.

  A for the Unicode format in little-endian byte order.

  This property is read-only.

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

  This encoding automatically detects a byte order mark and, if necessary, switches byte orders.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Text.Encoding To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Property
  System.Text.Encoding To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Text.Encoding

  Gets an encoding for the UTF-8 format.

  A for the UTF-8 format.

  This property is read-only.

  For detailed information regarding UTF-8 encoding, see .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String The name of the encoding, in a web-standard form (IANA). The name of the encoding in web form. This is the IANA-compliant name for this encoding. It is used when working with the HTTP protocol. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32 To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
0 System.Runtime.InteropServices.ComVisible(true)