System.Text.Encoding Members

The members of System.Text.Encoding are listed below.

See Also: Inherited members from System.Object

Protected Constructors

Initializes a new instance of the System.Text.Encoding class.

Initializes a new instance of the System.Text.Encoding class that corresponds to the specified code page.

Public Properties

[read-only]
static
ASCIIEncoding.

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

[read-only]
static
BigEndianUnicodeEncoding.

Gets an encoding for the UTF-16 format that uses the big endian byte order.

[read-only]
BodyNamestring.

When overridden in a derived class, gets a name for the current encoding that can be used with mail agent body tags.

[read-only]
CodePageint.

When overridden in a derived class, gets the code page identifier of the current System.Text.Encoding.

DecoderFallbackDecoderFallback.

Gets or sets the System.Text.DecoderFallback object for the current System.Text.Encoding object.

[read-only]
static
DefaultEncoding.

Gets an encoding for the operating system's current ANSI code page.

EncoderFallbackEncoderFallback.

Gets or sets the System.Text.EncoderFallback object for the current System.Text.Encoding object.

[read-only]
EncodingNamestring.

When overridden in a derived class, gets the human-readable description of the current encoding.

[read-only]
HeaderNamestring.

When overridden in a derived class, gets a name for the current encoding that can be used with mail agent header tags.

[read-only]
IsBrowserDisplaybool.

When overridden in a derived class, gets a value indicating whether the current encoding can be used by browser clients for displaying content.

[read-only]
IsBrowserSavebool.

When overridden in a derived class, gets a value indicating whether the current encoding can be used by browser clients for saving content.

[read-only]
IsMailNewsDisplaybool.

When overridden in a derived class, gets a value indicating whether the current encoding can be used by mail and news clients for displaying content.

[read-only]
IsMailNewsSavebool.

When overridden in a derived class, gets a value indicating whether the current encoding can be used by mail and news clients for saving content.

[read-only]
IsReadOnlybool.

When overridden in a derived class, gets a value indicating whether the current encoding is read-only.

[read-only]
IsSingleBytebool.

When overridden in a derived class, gets a value indicating whether the current encoding uses single-byte code points.

[read-only]
static
UnicodeEncoding.

Gets an encoding for the UTF-16 format using the little endian byte order.

[read-only]
static
UTF32Encoding.

Gets an encoding for the UTF-32 format using the little endian byte order.

[read-only]
static
UTF7Encoding.

Gets an encoding for the UTF-7 format.

[read-only]
static
UTF8Encoding.

Gets an encoding for the UTF-8 format.

[read-only]
WebNamestring.

When overridden in a derived class, gets the name registered with the Internet Assigned Numbers Authority (IANA) for the current encoding.

[read-only]
WindowsCodePageint.

When overridden in a derived class, gets the Windows operating system code page that most closely corresponds to the current encoding.

Public Methods

Clone() : object

When overridden in a derived class, creates a shallow copy of the current System.Text.Encoding object.

static
Convert(Encoding, Encoding, byte[]) : byte[]

Converts an entire byte array from one encoding to another.

static
Convert(Encoding, Encoding, byte[], int, int) : byte[]

Converts a range of bytes in a byte array from one encoding to another.

override
Equals(object) : bool

Determines whether the specified object is equal to the current instance.

GetByteCount(char[]) : int

When overridden in a derived class, calculates the number of bytes produced by encoding all the characters in the specified character array.

GetByteCount(string) : int

When overridden in a derived class, calculates the number of bytes produced by encoding the characters in the specified string.

GetByteCount(char*, int) : int

When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters starting at the specified character pointer.

abstract
GetByteCount(char[], int, int) : int

When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters from the specified character array.

GetBytes(char[]) : byte[]

When overridden in a derived class, encodes all the characters in the specified character array into a sequence of bytes.

GetBytes(string) : byte[]

When overridden in a derived class, encodes all the characters in the specified string into a sequence of bytes.

GetBytes(char[], int, int) : byte[]

When overridden in a derived class, encodes a set of characters from the specified character array into a sequence of bytes.

GetBytes(char*, int, byte*, int) : int

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.

abstract
GetBytes(char[], int, int, byte[], int) : int

When overridden in a derived class, encodes a set of characters from the specified character array into the specified byte array.

GetBytes(string, int, int, byte[], int) : int

When overridden in a derived class, encodes a set of characters from the specified string into the specified byte array.

GetCharCount(byte[]) : int

When overridden in a derived class, calculates the number of characters produced by decoding all the bytes in the specified byte array.

GetCharCount(byte*, int) : int

When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer.

abstract
GetCharCount(byte[], int, int) : int

When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.

GetChars(byte[]) : char[]

When overridden in a derived class, decodes all the bytes in the specified byte array into a set of characters.

GetChars(byte[], int, int) : char[]

When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a set of characters.

GetChars(byte*, int, char*, int) : int

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.

abstract
GetChars(byte[], int, int, char[], int) : int

When overridden in a derived class, decodes a sequence of bytes from the specified byte array into the specified character array.

GetDecoder() : Decoder

When overridden in a derived class, obtains a decoder that converts an encoded sequence of bytes into a sequence of characters.

GetEncoder() : Encoder

When overridden in a derived class, obtains an encoder that converts a sequence of Unicode characters into an encoded sequence of bytes.

static
GetEncoding(int) : Encoding

Returns the encoding associated with the specified code page identifier.

static
GetEncoding(string) : Encoding

Returns the encoding associated with the specified code page name.

static
GetEncoding(int, EncoderFallback, DecoderFallback) : Encoding

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.

static
GetEncoding(string, EncoderFallback, DecoderFallback) : Encoding

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.

static
GetEncodings() : EncodingInfo[]

Returns an array that contains all encodings.

override
GetHashCode() : int

Returns the hash code for the current instance.

abstract
GetMaxByteCount(int) : int

When overridden in a derived class, calculates the maximum number of bytes produced by encoding the specified number of characters.

abstract
GetMaxCharCount(int) : int

When overridden in a derived class, calculates the maximum number of characters produced by decoding the specified number of bytes.

GetPreamble() : byte[]

When overridden in a derived class, returns a sequence of bytes that specifies the encoding used.

GetString(byte[]) : string

When overridden in a derived class, decodes all the bytes in the specified byte array into a string.

GetString(byte[], int, int) : string

When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a string.

IsAlwaysNormalized() : bool

Gets a value indicating whether the current encoding is always normalized, using the default normalization form.

IsAlwaysNormalized(NormalizationForm) : bool

When overridden in a derived class, gets a value indicating whether the current encoding is always normalized, using the specified normalization form.