Click or drag to resize
StringBuilder Class
Represents a mutable string of characters. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  System.TextStringBuilder

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public sealed class StringBuilder : ISerializable

The StringBuilder type exposes the following members.

Methods
  NameDescription
Public methodAppend(Boolean)
Appends the string representation of a specified Boolean value to this instance.
Public methodAppend(Byte)
Appends the string representation of a specified 8-bit unsigned integer to this instance.
Public methodAppend(Char)
Appends the string representation of a specified Unicode character to this instance.
Public methodAppend(Char)
Appends the string representation of the Unicode characters in a specified array to this instance.
Public methodAppend(Decimal)
Appends the string representation of a specified decimal number to this instance.
Public methodAppend(Double)
Appends the string representation of a specified double-precision floating-point number to this instance.
Public methodAppend(Int16)
Appends the string representation of a specified 16-bit signed integer to this instance.
Public methodAppend(Int32)
Appends the string representation of a specified 32-bit signed integer to this instance.
Public methodAppend(Int64)
Appends the string representation of a specified 64-bit signed integer to this instance.
Public methodAppend(Object)
Appends the string representation of a specified object to this instance.
Public methodAppend(SByte)
Appends the string representation of a specified 8-bit signed integer to this instance.
Public methodAppend(Single)
Appends the string representation of a specified single-precision floating-point number to this instance.
Public methodAppend(String)
Appends a copy of the specified string to this instance.
Public methodAppend(UInt16)
Appends the string representation of a specified 16-bit unsigned integer to this instance.
Public methodAppend(UInt32)
Appends the string representation of a specified 32-bit unsigned integer to this instance.
Public methodAppend(UInt64)
Appends the string representation of a specified 64-bit unsigned integer to this instance.
Public methodAppend(Char, Int32)
Appends a specified number of copies of the string representation of a Unicode character to this instance.
Public methodAppend(Char, Int32, Int32)
Appends the string representation of a specified subarray of Unicode characters to this instance.
Public methodAppend(String, Int32, Int32)
Appends a copy of a specified substring to this instance.
Public methodAppendFormat(String, Object)
Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a single argument.
Public methodAppendFormat(String, Object)
Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a corresponding argument in a parameter array.
Public methodAppendFormat(IFormatProvider, String, Object)
Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a corresponding argument in a parameter array using a specified format provider.
Public methodAppendFormat(String, Object, Object)
Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of either of two arguments.
Public methodAppendFormat(String, Object, Object, Object)
Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of either of three arguments.
Public methodAppendLine
Appends the default line terminator to the end of the current StringBuilder object.
Public methodAppendLine(String)
Appends a copy of the specified string followed by the default line terminator to the end of the current StringBuilder object.
Public methodClear
Removes all characters from the current StringBuilder instance.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodEquals(StringBuilder)
Returns a value indicating whether this instance is equal to a specified object.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodReplace(Char, Char)
Replaces all occurrences of a specified character in this instance with another specified character.
Public methodReplace(String, String)
Replaces all occurrences of a specified string in this instance with another specified string.
Public methodReplace(Char, Char, Int32, Int32)
Replaces, within a substring of this instance, all occurrences of a specified character with another specified character.
Public methodReplace(String, String, Int32, Int32)
Replaces, within a substring of this instance, all occurrences of a specified string with another specified string.
Public methodToString
Converts the value of this instance to a String.
(Overrides ObjectToString.)
Public methodToString(Int32, Int32)
Converts the value of a substring of this instance to a String.
Top
Properties
  NameDescription
Public propertyLength
Gets or sets the length of the current StringBuilder object.
Top
See Also