mscorlib(4.0.0.0) API with additions
|
Represents a mutable string of characters. This class cannot be inherited.To browse the .NET Framework source code for this type, see the Reference Source. More...
Public Member Functions | |
StringBuilder () | |
Initializes a new instance of the T:System.Text.StringBuilder class. More... | |
StringBuilder (int capacity) | |
Initializes a new instance of the T:System.Text.StringBuilder class using the specified capacity. More... | |
StringBuilder (string value) | |
Initializes a new instance of the T:System.Text.StringBuilder class using the specified string. More... | |
StringBuilder??? (string value, int capacity) | |
Initializes a new instance of the T:System.Text.StringBuilder class using the specified string and capacity. More... | |
unsafe | StringBuilder (string value, int startIndex, int length, int capacity) |
Initializes a new instance of the T:System.Text.StringBuilder class from the specified substring and capacity. More... | |
StringBuilder (int capacity, int maxCapacity) | |
Initializes a new instance of the T:System.Text.StringBuilder class that starts with a specified capacity and can grow to a specified maximum. More... | |
int | EnsureCapacity (int capacity) |
Ensures that the capacity of this instance of T:System.Text.StringBuilder is at least the specified value. More... | |
unsafe override string | ToString () |
Converts the value of this instance to a T:System.String. More... | |
unsafe string | ToString (int startIndex, int length) |
Converts the value of a substring of this instance to a T:System.String. More... | |
StringBuilder | Clear () |
Removes all characters from the current T:System.Text.StringBuilder instance. More... | |
StringBuilder | Append (char value, int repeatCount) |
Appends a specified number of copies of the string representation of a Unicode character to this instance. More... | |
unsafe StringBuilder | Append (char[] value, int startIndex, int charCount) |
Appends the string representation of a specified subarray of Unicode characters to this instance. More... | |
unsafe StringBuilder | Append (string value) |
Appends a copy of the specified string to this instance. More... | |
unsafe StringBuilder | Append (string value, int startIndex, int count) |
Appends a copy of a specified substring to this instance. More... | |
StringBuilder | AppendLine () |
Appends the default line terminator to the end of the current T:System.Text.StringBuilder object. More... | |
StringBuilder | AppendLine (string value) |
Appends a copy of the specified string followed by the default line terminator to the end of the current T:System.Text.StringBuilder object. More... | |
void | CopyTo (int sourceIndex, char[] destination, int destinationIndex, int count) |
Copies the characters from a specified segment of this instance to a specified segment of a destination T:System.Char array. More... | |
unsafe StringBuilder | Insert (int index, string value, int count) |
Inserts one or more copies of a specified string into this instance at the specified character position. More... | |
StringBuilder | Remove (int startIndex, int length) |
Removes the specified range of characters from this instance. More... | |
StringBuilder | Append (bool value) |
Appends the string representation of a specified Boolean value to this instance. More... | |
StringBuilder | Append (sbyte value) |
Appends the string representation of a specified 8-bit signed integer to this instance. More... | |
StringBuilder | Append (byte value) |
Appends the string representation of a specified 8-bit unsigned integer to this instance. More... | |
StringBuilder | Append (char value) |
Appends the string representation of a specified T:System.Char object to this instance. More... | |
StringBuilder | Append (short value) |
Appends the string representation of a specified 16-bit signed integer to this instance. More... | |
StringBuilder | Append (int value) |
Appends the string representation of a specified 32-bit signed integer to this instance. More... | |
StringBuilder | Append (long value) |
Appends the string representation of a specified 64-bit signed integer to this instance. More... | |
StringBuilder | Append (float value) |
Appends the string representation of a specified single-precision floating-point number to this instance. More... | |
StringBuilder | Append (double value) |
Appends the string representation of a specified double-precision floating-point number to this instance. More... | |
StringBuilder | Append (decimal value) |
Appends the string representation of a specified decimal number to this instance. More... | |
StringBuilder | Append (ushort value) |
Appends the string representation of a specified 16-bit unsigned integer to this instance. More... | |
StringBuilder | Append (uint value) |
Appends the string representation of a specified 32-bit unsigned integer to this instance. More... | |
StringBuilder | Append (ulong value) |
Appends the string representation of a specified 64-bit unsigned integer to this instance. More... | |
StringBuilder | Append (object value) |
Appends the string representation of a specified object to this instance. More... | |
unsafe StringBuilder | Append (char[] value) |
Appends the string representation of the Unicode characters in a specified array to this instance. More... | |
unsafe StringBuilder | Insert (int index, string value) |
Inserts a string into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, bool value) |
Inserts the string representation of a Boolean value into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, sbyte value) |
Inserts the string representation of a specified 8-bit signed integer into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, byte value) |
Inserts the string representation of a specified 8-bit unsigned integer into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, short value) |
Inserts the string representation of a specified 16-bit signed integer into this instance at the specified character position. More... | |
unsafe StringBuilder | Insert (int index, char value) |
Inserts the string representation of a specified Unicode character into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, char[] value) |
Inserts the string representation of a specified array of Unicode characters into this instance at the specified character position. More... | |
unsafe StringBuilder | Insert (int index, char[] value, int startIndex, int charCount) |
Inserts the string representation of a specified subarray of Unicode characters into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, int value) |
Inserts the string representation of a specified 32-bit signed integer into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, long value) |
Inserts the string representation of a 64-bit signed integer into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, float value) |
Inserts the string representation of a single-precision floating point number into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, double value) |
Inserts the string representation of a double-precision floating-point number into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, decimal value) |
Inserts the string representation of a decimal number into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, ushort value) |
Inserts the string representation of a 16-bit unsigned integer into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, uint value) |
Inserts the string representation of a 32-bit unsigned integer into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, ulong value) |
Inserts the string representation of a 64-bit unsigned integer into this instance at the specified character position. More... | |
StringBuilder | Insert (int index, object value) |
Inserts the string representation of an object into this instance at the specified character position. More... | |
StringBuilder | AppendFormat (string format, object arg0) |
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. More... | |
StringBuilder | AppendFormat (string format, object arg0, object arg1) |
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. More... | |
StringBuilder | AppendFormat (string format, object arg0, object arg1, object arg2) |
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. More... | |
StringBuilder | AppendFormat (string format, params object[] args) |
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. More... | |
StringBuilder | AppendFormat (IFormatProvider provider, string format, object arg0) |
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 using a specified format provider. More... | |
StringBuilder | AppendFormat (IFormatProvider provider, string format, object arg0, object arg1) |
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 using a specified format provider. More... | |
StringBuilder | AppendFormat (IFormatProvider provider, string format, object arg0, object arg1, object arg2) |
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 using a specified format provider. More... | |
StringBuilder | AppendFormat (IFormatProvider provider, string format, params object[] args) |
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. More... | |
StringBuilder | Replace (string oldValue, string newValue) |
Replaces all occurrences of a specified string in this instance with another specified string. More... | |
bool | Equals (StringBuilder sb) |
Returns a value indicating whether this instance is equal to a specified object. More... | |
StringBuilder | Replace (string oldValue, string newValue, int startIndex, int count) |
Replaces, within a substring of this instance, all occurrences of a specified string with another specified string. More... | |
StringBuilder | Replace (char oldChar, char newChar) |
Replaces all occurrences of a specified character in this instance with another specified character. More... | |
StringBuilder | Replace (char oldChar, char newChar, int startIndex, int count) |
Replaces, within a substring of this instance, all occurrences of a specified character with another specified character. More... | |
unsafe StringBuilder | Append (char *value, int valueCount) |
Appends an array of Unicode characters starting at a specified address to this instance. More... | |
Properties | |
int | Capacity [get, set] |
Gets or sets the maximum number of characters that can be contained in the memory allocated by the current instance. More... | |
int | MaxCapacity [get] |
Gets the maximum capacity of this instance. More... | |
int | Length [get, set] |
Gets or sets the length of the current T:System.Text.StringBuilder object. More... | |
char | this[int index] [get, set] |
Gets or sets the character at the specified character position in this instance. More... | |
Represents a mutable string of characters. This class cannot be inherited.To browse the .NET Framework source code for this type, see the Reference Source.
Definition at line 14 of file StringBuilder.cs.
System.Text.StringBuilder.StringBuilder | ( | ) |
Initializes a new instance of the T:System.Text.StringBuilder class.
Definition at line 191 of file StringBuilder.cs.
System.Text.StringBuilder.StringBuilder | ( | int | capacity | ) |
Initializes a new instance of the T:System.Text.StringBuilder class using the specified capacity.
capacity | The suggested starting size of this instance. |
T:System.ArgumentOutOfRangeException | capacity is less than zero. |
Definition at line 201 of file StringBuilder.cs.
System.Text.StringBuilder.StringBuilder | ( | string | value | ) |
Initializes a new instance of the T:System.Text.StringBuilder class using the specified string.
value | The string used to initialize the value of the instance. If value is null , the new T:System.Text.StringBuilder will contain the empty string (that is, it contains F:System.String.Empty). |
Definition at line 209 of file StringBuilder.cs.
unsafe System.Text.StringBuilder.StringBuilder | ( | string | value, |
int | startIndex, | ||
int | length, | ||
int | capacity | ||
) |
Initializes a new instance of the T:System.Text.StringBuilder class from the specified substring and capacity.
value | The string that contains the substring used to initialize the value of this instance. If value is null , the new T:System.Text.StringBuilder will contain the empty string (that is, it contains F:System.String.Empty). |
startIndex | The position within value where the substring begins. |
length | The number of characters in the substring. |
capacity | The suggested starting size of the T:System.Text.StringBuilder. |
T:System.ArgumentOutOfRangeException | capacity is less than zero.-or- startIndex plus length is not a position within value . |
Definition at line 235 of file StringBuilder.cs.
System.Text.StringBuilder.StringBuilder | ( | int | capacity, |
int | maxCapacity | ||
) |
Initializes a new instance of the T:System.Text.StringBuilder class that starts with a specified capacity and can grow to a specified maximum.
capacity | The suggested starting size of the T:System.Text.StringBuilder. |
maxCapacity | The maximum number of characters the current string can contain. |
T:System.ArgumentOutOfRangeException | maxCapacity is less than one, capacity is less than zero, or capacity is greater than maxCapacity . |
Definition at line 280 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | char | value, |
int | repeatCount | ||
) |
Appends a specified number of copies of the string representation of a Unicode character to this instance.
value | The character to append. |
repeatCount | The number of times to append value . |
T:System.ArgumentOutOfRangeException | repeatCount is less than zero.-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
T:System.OutOfMemoryException | Out of memory. |
Definition at line 540 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Append | ( | char [] | value, |
int | startIndex, | ||
int | charCount | ||
) |
Appends the string representation of a specified subarray of Unicode characters to this instance.
value | A character array. |
startIndex | The starting position in value . |
charCount | The number of characters to append. |
T:System.ArgumentNullException | value is null , and startIndex and charCount are not zero. |
T:System.ArgumentOutOfRangeException | charCount is less than zero.-or- startIndex is less than zero.-or- startIndex + charCount is greater than the length of value .-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 582 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Append | ( | string | value | ) |
Appends a copy of the specified string to this instance.
value | The string to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 625 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Append | ( | string | value, |
int | startIndex, | ||
int | count | ||
) |
Appends a copy of a specified substring to this instance.
value | The string that contains the substring to append. |
startIndex | The starting position of the substring within value . |
count | The number of characters in value to append. |
T:System.ArgumentNullException | value is null , and startIndex and count are not zero. |
T:System.ArgumentOutOfRangeException | count less than zero.-or- startIndex less than zero.-or- startIndex + count is greater than the length of value .-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 696 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | bool | value | ) |
Appends the string representation of a specified Boolean value to this instance.
value | The Boolean value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 904 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | sbyte | value | ) |
Appends the string representation of a specified 8-bit signed integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 915 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | byte | value | ) |
Appends the string representation of a specified 8-bit unsigned integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 925 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | char | value | ) |
Appends the string representation of a specified T:System.Char object to this instance.
value | The UTF-16-encoded code unit to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 935 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | short | value | ) |
Appends the string representation of a specified 16-bit signed integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 953 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | int | value | ) |
Appends the string representation of a specified 32-bit signed integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 963 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | long | value | ) |
Appends the string representation of a specified 64-bit signed integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 973 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | float | value | ) |
Appends the string representation of a specified single-precision floating-point number to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 983 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | double | value | ) |
Appends the string representation of a specified double-precision floating-point number to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 993 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | decimal | value | ) |
Appends the string representation of a specified decimal number to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1003 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | ushort | value | ) |
Appends the string representation of a specified 16-bit unsigned integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1014 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | uint | value | ) |
Appends the string representation of a specified 32-bit unsigned integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1025 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | ulong | value | ) |
Appends the string representation of a specified 64-bit unsigned integer to this instance.
value | The value to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1036 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Append | ( | object | value | ) |
Appends the string representation of a specified object to this instance.
value | The object to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1046 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Append | ( | char [] | value | ) |
Appends the string representation of the Unicode characters in a specified array to this instance.
value | The array of characters to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1061 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Append | ( | char * | value, |
int | valueCount | ||
) |
Appends an array of Unicode characters starting at a specified address to this instance.
value | A pointer to an array of characters. |
valueCount | The number of characters in the array. |
T:System.ArgumentOutOfRangeException | valueCount is less than zero. -or-Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
T:System.NullReferenceException | value is a null pointer. |
Definition at line 1932 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | string | format, |
object | arg0 | ||
) |
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.
format | A composite format string (see Remarks). |
arg0 | An object to format. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | format is invalid. -or-The index of a format item is less than 0 (zero), or greater than or equal to 1. |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1369 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | string | format, |
object | arg0, | ||
object | arg1 | ||
) |
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.
format | A composite format string (see Remarks). |
arg0 | The first object to format. |
arg1 | The second object to format. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | format is invalid.-or-The index of a format item is less than 0 (zero), or greater than or equal to 2. |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1385 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | string | format, |
object | arg0, | ||
object | arg1, | ||
object | arg2 | ||
) |
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.
format | A composite format string (see Remarks). |
arg0 | The first object to format. |
arg1 | The second object to format. |
arg2 | The third object to format. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | format is invalid.-or-The index of a format item is less than 0 (zero), or greater than or equal to 3. |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1402 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | string | format, |
params object [] | args | ||
) |
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.
format | A composite format string (see Remarks). |
args | An array of objects to format. |
T:System.ArgumentNullException | format or args is null . |
T:System.FormatException | format is invalid. -or-The index of a format item is less than 0 (zero), or greater than or equal to the length of the args array. |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1417 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | IFormatProvider | provider, |
string | format, | ||
object | arg0 | ||
) |
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 using a specified format provider.
provider | An object that supplies culture-specific formatting information. |
format | A composite format string (see Remarks). |
arg0 | The object to format. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | format is invalid. -or-The index of a format item is less than 0 (zero), or greater than or equal to one (1). |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1437 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | IFormatProvider | provider, |
string | format, | ||
object | arg0, | ||
object | arg1 | ||
) |
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 using a specified format provider.
provider | An object that supplies culture-specific formatting information. |
format | A composite format string (see Remarks). |
arg0 | The first object to format. |
arg1 | The second object to format. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | format is invalid. -or-The index of a format item is less than 0 (zero), or greater than or equal to 2 (two). |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1454 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | IFormatProvider | provider, |
string | format, | ||
object | arg0, | ||
object | arg1, | ||
object | arg2 | ||
) |
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 using a specified format provider.
provider | An object that supplies culture-specific formatting information. |
format | A composite format string (see Remarks). |
arg0 | The first object to format. |
arg1 | The second object to format. |
arg2 | The third object to format. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | format is invalid. -or-The index of a format item is less than 0 (zero), or greater than or equal to 3 (three). |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1472 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendFormat | ( | IFormatProvider | provider, |
string | format, | ||
params object [] | args | ||
) |
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.
provider | An object that supplies culture-specific formatting information. |
format | A composite format string (see Remarks). |
args | An array of objects to format. |
T:System.ArgumentNullException | format is null . |
T:System.FormatException | format is invalid. -or-The index of a format item is less than 0 (zero), or greater than or equal to the length of the args array. |
T:System.ArgumentOutOfRangeException | The length of the expanded string would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1488 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendLine | ( | ) |
Appends the default line terminator to the end of the current T:System.Text.StringBuilder object.
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 738 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.AppendLine | ( | string | value | ) |
Appends a copy of the specified string followed by the default line terminator to the end of the current T:System.Text.StringBuilder object.
value | The string to append. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 749 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Clear | ( | ) |
Removes all characters from the current T:System.Text.StringBuilder instance.
Definition at line 526 of file StringBuilder.cs.
void System.Text.StringBuilder.CopyTo | ( | int | sourceIndex, |
char [] | destination, | ||
int | destinationIndex, | ||
int | count | ||
) |
Copies the characters from a specified segment of this instance to a specified segment of a destination T:System.Char array.
sourceIndex | The starting position in this instance where characters will be copied from. The index is zero-based. |
destination | The array where characters will be copied. |
destinationIndex | The starting position in destination where characters will be copied. The index is zero-based. |
count | The number of characters to be copied. |
T:System.ArgumentNullException | destination is null . |
T:System.ArgumentOutOfRangeException | sourceIndex , destinationIndex , or count , is less than zero.-or- sourceIndex is greater than the length of this instance. |
T:System.ArgumentException | sourceIndex + count is greater than the length of this instance.-or- destinationIndex + count is greater than the length of destination . |
Definition at line 771 of file StringBuilder.cs.
int System.Text.StringBuilder.EnsureCapacity | ( | int | capacity | ) |
Ensures that the capacity of this instance of T:System.Text.StringBuilder is at least the specified value.
capacity | The minimum capacity to ensure. |
T:System.ArgumentOutOfRangeException | capacity is less than zero.-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 402 of file StringBuilder.cs.
bool System.Text.StringBuilder.Equals | ( | StringBuilder | sb | ) |
Returns a value indicating whether this instance is equal to a specified object.
sb | An object to compare with this instance, or null . |
true
if this instance and sb have equal string, P:System.Text.StringBuilder.Capacity, and P:System.Text.StringBuilder.MaxCapacity values; otherwise, false
.Definition at line 1733 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
string | value, | ||
int | count | ||
) |
Inserts one or more copies of a specified string into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The string to insert. |
count | The number of times to insert value . |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the current length of this instance.-or- count is less than zero. |
T:System.OutOfMemoryException | The current length of this T:System.Text.StringBuilder object plus the length of value times count exceeds P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 835 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
string | value | ||
) |
Inserts a string into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The string to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the current length of this instance. -or-The current length of this T:System.Text.StringBuilder object plus the length of value exceeds P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1081 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
bool | value | ||
) |
Inserts the string representation of a Boolean value into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1105 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
sbyte | value | ||
) |
Inserts the string representation of a specified 8-bit signed integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1119 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
byte | value | ||
) |
Inserts the string representation of a specified 8-bit unsigned integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1132 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
short | value | ||
) |
Inserts the string representation of a specified 16-bit signed integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1145 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
char | value | ||
) |
Inserts the string representation of a specified Unicode character into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance.-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1158 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
char [] | value | ||
) |
Inserts the string representation of a specified array of Unicode characters into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The character array to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance.-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1171 of file StringBuilder.cs.
unsafe StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
char [] | value, | ||
int | startIndex, | ||
int | charCount | ||
) |
Inserts the string representation of a specified subarray of Unicode characters into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | A character array. |
startIndex | The starting index within value . |
charCount | The number of characters to insert. |
T:System.ArgumentNullException | value is null , and startIndex and charCount are not zero. |
T:System.ArgumentOutOfRangeException | index , startIndex , or charCount is less than zero.-or- index is greater than the length of this instance.-or- startIndex plus charCount is not a position within value .-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1198 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
int | value | ||
) |
Inserts the string representation of a specified 32-bit signed integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1243 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
long | value | ||
) |
Inserts the string representation of a 64-bit signed integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1256 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
float | value | ||
) |
Inserts the string representation of a single-precision floating point number into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1269 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
double | value | ||
) |
Inserts the string representation of a double-precision floating-point number into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1282 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
decimal | value | ||
) |
Inserts the string representation of a decimal number into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1295 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
ushort | value | ||
) |
Inserts the string representation of a 16-bit unsigned integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1309 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
uint | value | ||
) |
Inserts the string representation of a 32-bit unsigned integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1323 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
ulong | value | ||
) |
Inserts the string representation of a 64-bit unsigned integer into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The value to insert. |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1337 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Insert | ( | int | index, |
object | value | ||
) |
Inserts the string representation of an object into this instance at the specified character position.
index | The position in this instance where insertion begins. |
value | The object to insert, or null . |
T:System.ArgumentOutOfRangeException | index is less than zero or greater than the length of this instance. |
T:System.OutOfMemoryException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1350 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Remove | ( | int | startIndex, |
int | length | ||
) |
Removes the specified range of characters from this instance.
startIndex | The zero-based position in this instance where removal begins. |
length | The number of characters to remove. |
T:System.ArgumentOutOfRangeException | If startIndex or length is less than zero, or startIndex + length is greater than the length of this instance. |
Definition at line 873 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Replace | ( | string | oldValue, |
string | newValue | ||
) |
Replaces all occurrences of a specified string in this instance with another specified string.
oldValue | The string to replace. |
newValue | The string that replaces oldValue , or null . |
T:System.ArgumentNullException | oldValue is null . |
T:System.ArgumentException | The length of oldValue is zero. |
T:System.ArgumentOutOfRangeException | Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1723 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Replace | ( | string | oldValue, |
string | newValue, | ||
int | startIndex, | ||
int | count | ||
) |
Replaces, within a substring of this instance, all occurrences of a specified string with another specified string.
oldValue | The string to replace. |
newValue | The string that replaces oldValue , or null . |
startIndex | The position in this instance where the substring begins. |
count | The length of the substring. |
T:System.ArgumentNullException | oldValue is null . |
T:System.ArgumentException | The length of oldValue is zero. |
T:System.ArgumentOutOfRangeException | startIndex or count is less than zero.-or- startIndex plus count indicates a character position not within this instance.-or- Enlarging the value of this instance would exceed P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 1799 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Replace | ( | char | oldChar, |
char | newChar | ||
) |
Replaces all occurrences of a specified character in this instance with another specified character.
oldChar | The character to replace. |
newChar | The character that replaces oldChar . |
Definition at line 1869 of file StringBuilder.cs.
StringBuilder System.Text.StringBuilder.Replace | ( | char | oldChar, |
char | newChar, | ||
int | startIndex, | ||
int | count | ||
) |
Replaces, within a substring of this instance, all occurrences of a specified character with another specified character.
oldChar | The character to replace. |
newChar | The character that replaces oldChar . |
startIndex | The position in this instance where the substring begins. |
count | The length of the substring. |
T:System.ArgumentOutOfRangeException | startIndex + count is greater than the length of the value of this instance.-or- startIndex or count is less than zero. |
Definition at line 1884 of file StringBuilder.cs.
System.Text.StringBuilder.StringBuilder??? | ( | string | value, |
int | capacity | ||
) |
Initializes a new instance of the T:System.Text.StringBuilder class using the specified string and capacity.
value | The string used to initialize the value of the instance. If value is null , the new T:System.Text.StringBuilder will contain the empty string (that is, it contains F:System.String.Empty). |
capacity | The suggested starting size of the T:System.Text.StringBuilder. |
T:System.ArgumentOutOfRangeException | capacity is less than zero. |
Definition at line 220 of file StringBuilder.cs.
unsafe override string System.Text.StringBuilder.ToString | ( | ) |
Converts the value of this instance to a T:System.String.
Definition at line 419 of file StringBuilder.cs.
unsafe string System.Text.StringBuilder.ToString | ( | int | startIndex, |
int | length | ||
) |
Converts the value of a substring of this instance to a T:System.String.
startIndex | The starting position of the substring in this instance. |
length | The length of the substring. |
T:System.ArgumentOutOfRangeException | startIndex or length is less than zero.-or- The sum of startIndex and length is greater than the length of the current instance. |
Definition at line 461 of file StringBuilder.cs.
|
getset |
Gets or sets the maximum number of characters that can be contained in the memory allocated by the current instance.
T:System.ArgumentOutOfRangeException | The value specified for a set operation is less than the current length of this instance.-or- The value specified for a set operation is greater than the maximum capacity. |
Definition at line 43 of file StringBuilder.cs.
|
getset |
Gets or sets the length of the current T:System.Text.StringBuilder object.
T:System.ArgumentOutOfRangeException | The value specified for a set operation is less than zero or greater than P:System.Text.StringBuilder.MaxCapacity. |
Definition at line 91 of file StringBuilder.cs.
|
get |
Gets the maximum capacity of this instance.
Definition at line 78 of file StringBuilder.cs.
|
getset |
Gets or sets the character at the specified character position in this instance.
index | The position of the character. |
T:System.ArgumentOutOfRangeException | index is outside the bounds of this instance while setting a character. |
T:System.IndexOutOfRangeException | index is outside the bounds of this instance while getting a character. |
Definition at line 145 of file StringBuilder.cs.