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 UTF8 character .

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

UTF-8 encodes Unicode characters with a variable number of bytes per character. This encoding is optimized for the lower 127 ASCII characters, yielding an efficient mechanism to encode English in an internationalizable way. The UTF-8 identifier is the Unicode byte order mark (0xFEFF) written in UTF-8 (0xEF 0xBB 0xBF). The byte order mark is used to distinguish UTF-8 text from other encodings.

This class offers an error-checking feature that can be turned on when an instance of the class is constructed. Certain methods in this class check for invalid sequences of surrogate pairs. If error-checking is turned on and an invalid sequence is detected, is thrown. If error-checking is not turned on and an invalid sequence is detected, no exception is thrown and execution continues in a method-defined manner. For more information regarding surrogate pairs, see

.

- Constructor

  Constructs a new instance of the class.

  This constructor is equivalent to (, ).

  By default, this constructor turns error-checking off for the new instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  A that indicates whether the Unicode byte order mark in UTF-8 is recognized or emitted when reading from or writing to a .

  Constructs a new instance of the class with the specified that indicates whether the Unicode byte order mark in UTF-8 is recognized or emitted when reading from or writing to a .

  This constructor is equivalent to (, ).

  By default, this constructor turns error-checking off for the new instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  A that indicates whether the Unicode byte order mark in UTF-8 is recognized or emitted when reading from or writing to a .
  A that indicates whether error-checking is turned on for the current instance.
  To be added.

  Constructs a new instance of the class using the specified flags.

  To be added.
  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Boolean `` A to compare with the current instance.

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

  if value is a and represents the same type and value as the current instance; otherwise, .

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 ``

  A to encode as a .

  Determines the number of bytes required to encode the characters in the specified as a .

  A that specifies the number of bytes necessary to encode as a .

  If error-checking is turned off and an invalid surrogate sequence is detected, the invalid characters are ignored and do not affect the return value, and no exception is thrown.

  This method overrides .

  is .

  Error-checking is turned on for the current instance and contains an invalid surrogate sequence.

  The return value is greater than .

  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 as a . A that specifies the first index of to encode. A that specifies the number of characters to encode.

  Determines the number of bytes required to encode the specified range of characters in the specified Unicode character array as a .

  A containing the number of bytes necessary to encode the range in from to + - 1 as a .

  If error-checking is turned off and an invalid surrogate sequence is detected, the invalid characters are ignored and do not affect the return value, and no exception is thrown.

  This method overrides .

  is .

  The return value is greater than .

  -or-

  or is less than zero.

  -or-

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

  Error-checking is turned on for the current instance and contains an invalid surrogate sequence.

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

  Encodes the specified as a .

  A array containing the values encoded from as a .

  If error-checking is turned off and an invalid surrogate sequence is detected, the invalid characters are ignored and are not encoded into the returned array, and no exception is thrown.

  This method overrides .

  Error-checking is turned on for the current instance and contains an invalid surrogate sequence.

  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 `` `` `` `` `` The array to encode as a . A that specifies the first index of to encode. A that specifies the number of characters to encode. The array to encode into. A that specifies the first index of to encode into.

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

  A that indicates the number of bytes encoded into as a .

  If error-checking is turned off and an invalid surrogate sequence is detected, the invalid characters are ignored and are not encoded into , and no exception is thrown.

  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 specified number of characters, regardless of the actual character values.

  does not contain sufficient space to store the encoded characters.

  -or-

  Error-checking is turned on for the current instance and contains an invalid surrogate sequence.

  or is .

  , , or is less than zero.

  -or-

  (.Length - ) < .

  -or-

  > .Length.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` `` `` The to encode as a . A that specifies the first index of to encode. A that specifies the number of characters to encode. The array to encode into. A that specifies the first index of to encode into. To be added. 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 as a .

  A that indicates the number of bytes encoded into as a .

  If error-checking is turned off and an invalid surrogate sequence is detected, the invalid characters are ignored and are not encoded into , and no exception is thrown.

  This method overrides .

  does not contain sufficient space to store the encoded characters.

  -or-

  Error-checking is turned on for the current instance and contains an invalid surrogate sequence.

  or is .

  , , or is less than zero.

  -or-

  (.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 `` `` `` The array to decode as a . A that specifies the first index of to decode. A that specifies the number of bytes to decode.

  Returns the number of characters produced by decoding the specified range of the specified array as a .

  A that indicates the number of characters produced by decoding the range in from to + - 1 as a .

  If error-checking is turned off and an invalid surrogate sequence is detected, the invalid bytes are ignored and do not affect the return value, and no exception is thrown.

  This method overrides .

  is .

  or is less than zero.

  -or-

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

  Error-checking is turned on for the current instance and contains an invalid surrogate sequence.

  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 as a . A that specifies the first index of to decode. A that specifies the number of bytes to decode. The array to decode into. A that specifies the first index of to decode into.

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

  The number of characters decoded into as a .

  If error-checking is turned off and an invalid surrogate sequence is detected, the invalid bytes are ignored and are not encoded into , and no exception is thrown.

  This method overrides .

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

  does not contain sufficient space to store the decoded characters.

  -or-

  Error-checking is turned on for the current instance and contains an invalid surrogate sequence.

  or is .

  , , or is less than zero.

  -or-

  (.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.

  This method overrides .

  Contrary to , a decoder 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 instance.

  This method overrides .

  Contrary to , an encoder 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.Int32

  Generates a hash code for the current instance.

  A value containing a 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 that specifies the number of characters to encode as a .

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

  A that specifies the maximum number of bytes required to encode characters as a .

  This method overrides .

  This method can be used to determine an appropriate buffer size for byte arrays passed to . 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.Int32 `` A that specifies the number of bytes to decode as a .

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

  A that specifies the maximum number of characters produced by decoding bytes as a .

  This method overrides .

  This method can be used to determine an appropriate minimum buffer size for character arrays passed to . 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 stream to determine which encoding a file was created with.

  A array containing the UTF-8 encoding preamble.

  This method overrides .

  returns the Unicode byte order mark (U+FEFF) written in UTF-8 (0xef, 0xbb, 0xbf) if this instance was constructed with a request to emit the UTF-8 identifier.

  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. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
0 System.Runtime.InteropServices.ComVisible(true)