System.Text Namespace
Microsoft Silverlight will reach end of support after October 2021. Learn more.
The encoding classes are primarily intended to convert between different encodings or code pages and a Unicode encoding. Encoding.Unicode (UTF-16) encoding is used internally by the .NET Framework, and Encoding.UTF8 encoding is often used for storing character data to ensure portability across machines and cultures.
The StringBuilder class is designed for operations that perform extensive manipulations on a single string. Unlike the String class, the StringBuilder class is mutable and provides better performance when concatenating or deleting strings.
For more information about System.Text, see Character Encoding in the .NET Framework and the MSDN blog Shawn Steele's Thoughts about Windows and .NET Framework Globalization APIs.
Classes
Class | Description | |
---|---|---|
Decoder | Converts a sequence of encoded bytes into a set of characters. | |
DecoderFallbackException | The exception that is thrown when a decoder fallback operation fails. This class cannot be inherited. | |
Encoder | Converts a set of characters into a sequence of bytes. | |
EncoderFallbackException | The exception that is thrown when an encoder fallback operation fails. This class cannot be inherited. | |
Encoding | Represents a character encoding. | |
StringBuilder | Represents a mutable string of characters. This class cannot be inherited. | |
UnicodeEncoding | Represents a UTF-16 encoding of Unicode characters. | |
UTF8Encoding | Represents a UTF-8 encoding of Unicode characters. |