Namespace: System.Text
Encoding
Represents a character encoding.
Properties (1)
Encoding UTF8
Gets an encoding for the UTF-8 format.
Value: An encoding for the UTF-8 format.
Methods (3)
byte[] GetBytes(String)
When overridden in a derived class, encodes all the characters in the specified string into a sequence of bytes.
| Parameter | Description |
|---|---|
| s | The string containing the characters to encode. |
Returns: A byte array containing the results of encoding the specified set of characters.
String GetString(Byte[],Int32,Int32)
When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a string.
| Parameter | Description |
|---|---|
| bytes | The byte array containing the sequence of bytes to decode. |
| index | The index of the first byte to decode. |
| count | The number of bytes to decode. |
Returns: A string that contains the results of decoding the specified sequence of bytes.
String GetString(Byte[])
When overridden in a derived class, decodes all the bytes in the specified byte array into a string.
| Parameter | Description |
|---|---|
| bytes | The byte array containing the sequence of bytes to decode. |
Returns: A string that contains the results of decoding the specified sequence of bytes.