Namespace: System.Text

Provides fundamental classes and base classes for manipulating strings and byte arrays, and for converting between strings and byte arrays.

Namespace: System.Text

Assembly: System.Text.Native.dll, System.Runtime.dll

Classes

Encoding

public abstract class Encoding : object

Represents a character encoding. Encoding is a mechanism that maps a set of characters to a sequence of bytes. Encoding objects are used to convert strings to byte arrays and byte arrays to strings.

Summary: Abstract base class for all encodings. Provides methods for converting strings to byte arrays and vice versa.

Decoder

public abstract class Decoder : object

Converts a sequence of bytes in a specified encoding to a sequence of characters.

Summary: Abstract base class for decoders. Used to convert byte sequences to character sequences, handling multi-byte characters.

Encoder

public abstract class Encoder : object

Converts a sequence of characters to a sequence of bytes in a specified encoding.

Summary: Abstract base class for encoders. Used to convert character sequences to byte sequences, handling multi-byte characters.

StringBuilder

public sealed class StringBuilder : object

Represents a mutable sequence of characters. This class cannot be inherited.

Summary: Provides a mutable string-like object that allows for efficient manipulation of strings, especially in loops.

ASCIIEncoding

public sealed class ASCIIEncoding : Encoding

Represents the ASCII (American Standard Code for Information Interchange) character encoding.

Summary: Represents the ASCII encoding, which uses 7 bits to represent characters.

UTF8Encoding

public class UTF8Encoding : Encoding

Represents the UTF-8 encoding of the Unicode character set. UTF-8 is a variable-length encoding that uses one to four bytes per character.

Summary: Represents the UTF-8 encoding, a variable-length encoding for Unicode characters.