Encoding Methods

The Encoding type exposes the following members.

  Name Description
Public method Clone When overridden in a derived class, creates a shallow copy of the current Encoding object.
Public method Static member Convert(Encoding, Encoding, Byte[]) Converts an entire byte array from one encoding to another.
Public method Static member Convert(Encoding, Encoding, Byte[], Int32, Int32) Converts a range of bytes in a byte array from one encoding to another.
Public method Equals Determines whether the specified Object is equal to the current instance. (Overrides Object.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetByteCount(Char[]) When overridden in a derived class, calculates the number of bytes produced by encoding all the characters in the specified character array.
Public method GetByteCount(String) When overridden in a derived class, calculates the number of bytes produced by encoding the characters in the specified string.
Public method GetByteCount(Char*, Int32) When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters starting at the specified character pointer.
Public method GetByteCount(Char[], Int32, Int32) When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters from the specified character array.
Public method GetBytes(Char[]) When overridden in a derived class, encodes all the characters in the specified character array into a sequence of bytes.
Public method GetBytes(String) When overridden in a derived class, encodes all the characters in the specified string into a sequence of bytes.
Public method GetBytes(Char[], Int32, Int32) When overridden in a derived class, encodes a set of characters from the specified character array into a sequence of bytes.
Public method GetBytes(Char*, Int32, Byte*, Int32) When overridden in a derived class, encodes a set of characters starting at the specified character pointer into a sequence of bytes that are stored starting at the specified byte pointer.
Public method GetBytes(Char[], Int32, Int32, Byte[], Int32) When overridden in a derived class, encodes a set of characters from the specified character array into the specified byte array.
Public method GetBytes(String, Int32, Int32, Byte[], Int32) When overridden in a derived class, encodes a set of characters from the specified string into the specified byte array.
Public method GetCharCount(Byte[]) When overridden in a derived class, calculates the number of characters produced by decoding all the bytes in the specified byte array.
Public method GetCharCount(Byte*, Int32) When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer.
Public method GetCharCount(Byte[], Int32, Int32) When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
Public method GetChars(Byte[]) When overridden in a derived class, decodes all the bytes in the specified byte array into a set of characters.
Public method GetChars(Byte[], Int32, Int32) When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a set of characters.
Public method GetChars(Byte*, Int32, Char*, Int32) When overridden in a derived class, decodes a sequence of bytes starting at the specified byte pointer into a set of characters that are stored starting at the specified character pointer.
Public method GetChars(Byte[], Int32, Int32, Char[], Int32) When overridden in a derived class, decodes a sequence of bytes from the specified byte array into the specified character array.
Public method GetDecoder When overridden in a derived class, obtains a decoder that converts an encoded sequence of bytes into a sequence of characters.
Public method GetEncoder When overridden in a derived class, obtains an encoder that converts a sequence of Unicode characters into an encoded sequence of bytes.
Public method Static member GetEncoding(Int32) Returns the encoding associated with the specified code page identifier.
Public method Static member GetEncoding(String) Returns the encoding associated with the specified code page name.
Public method Static member GetEncoding(Int32, EncoderFallback, DecoderFallback) Returns the encoding associated with the specified code page identifier. Parameters specify an error handler for characters that cannot be encoded and byte sequences that cannot be decoded.
Public method Static member GetEncoding(String, EncoderFallback, DecoderFallback) Returns the encoding associated with the specified code page name. Parameters specify an error handler for characters that cannot be encoded and byte sequences that cannot be decoded.
Public method Static member GetEncodings Returns an array that contains all encodings.
Public method GetHashCode Returns the hash code for the current instance. (Overrides Object.GetHashCode().)
Public method GetMaxByteCount When overridden in a derived class, calculates the maximum number of bytes produced by encoding the specified number of characters.
Public method GetMaxCharCount When overridden in a derived class, calculates the maximum number of characters produced by decoding the specified number of bytes.
Public method GetPreamble When overridden in a derived class, returns a sequence of bytes that specifies the encoding used.
Public method GetString(Byte[]) When overridden in a derived class, decodes all the bytes in the specified byte array into a string.
Public method GetString(Byte[], Int32, Int32) When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a string.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsAlwaysNormalized() Gets a value indicating whether the current encoding is always normalized, using the default normalization form.
Public method IsAlwaysNormalized(NormalizationForm) When overridden in a derived class, gets a value indicating whether the current encoding is always normalized, using the specified normalization form.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft