Click or drag to resize
Encoding Class
Represents a character encoding.
Inheritance Hierarchy

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public abstract class Encoding : ICloneable

The Encoding type exposes the following members.

Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current instance.
(Overrides ObjectEquals(Object).)
Public methodGetByteCount(Char)
When overridden in a derived class, calculates the number of bytes produced by encoding all the characters in the specified character array.
Public methodGetByteCount(String)
When overridden in a derived class, calculates the number of bytes produced by encoding the characters in the specified string.
Public methodGetByteCount(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 methodGetByteCount(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 methodGetBytes(Char)
When overridden in a derived class, encodes all the characters in the specified character array into a sequence of bytes.
Public methodGetBytes(String)
When overridden in a derived class, encodes all the characters in the specified string into a sequence of bytes.
Public methodGetBytes(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 methodGetBytes(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 methodGetBytes(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 methodGetBytes(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 methodGetCharCount(Byte)
When overridden in a derived class, calculates the number of characters produced by decoding all the bytes in the specified byte array.
Public methodGetCharCount(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 methodGetCharCount(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 methodGetChars(Byte)
When overridden in a derived class, decodes all the bytes in the specified byte array into a set of characters.
Public methodGetChars(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 methodGetChars(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 methodGetChars(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 methodGetHashCode
Returns the hash code for the current instance.
(Overrides ObjectGetHashCode.)
Public methodGetString(Byte)
When overridden in a derived class, decodes all the bytes in the specified byte array into a string.
Public methodGetString(Byte, Int32, Int32)
When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a string.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyStatic memberASCII
Gets an encoding for the ASCII (7-bit) character set.
Public propertyStatic memberBigEndianUnicode
Gets an encoding for the UTF-16 format that uses the big endian byte order.
Public propertyStatic memberUnicode
Gets an encoding for the UTF-16 format using the little endian byte order.
Public propertyStatic memberUTF7
Gets an encoding for the UTF-7 format.
Public propertyStatic memberUTF8
Gets an encoding for the UTF-8 format.
Top
See Also