博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

System.Text公共命名空间

Posted on 2011-04-20 18:54  HH-Devil  阅读(177)  评论(0)    收藏  举报

System.Text公共命名空间

类名:StringBuilder.cs(继承ISerializable接口)

System.Text:System.Text.StringBuilder.cs[from metadata]

using System;

using System.Reflection;

using System.Runtime.InteropServices;

using System.Runtime.Serialization;

namespace System.Text

{

    // Summary:

    //     Represents a mutable string of characters. This class cannot be inherited.

    [Serializable]

    [ComVisible(true)]

    public sealed class StringBuilder : ISerializable

    {

        // Summary:

        //     Initializes a new instance of the System.Text.StringBuilder class.

        public StringBuilder();

        //

        // Summary:

        //     Initializes a new instance of the System.Text.StringBuilder class using the

        //     specified capacity.

        //

        // Parameters:

        //   capacity:

        //     The suggested starting size of this instance.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     capacity is less than zero.

        public StringBuilder(int capacity);

        //

        // Summary:

        //     Initializes a new instance of the System.Text.StringBuilder class using the

        //     specified string.

        //

        // Parameters:

        //   value:

        //     The string used to initialize the value of the instance. If value is null,

        //     the new System.Text.StringBuilder will contain the empty string (that is,

        //     it contains System.String.Empty).

        public StringBuilder(string value);

        //

        // Summary:

        //     Initializes a new instance of the System.Text.StringBuilder class that starts

        //     with a specified capacity and can grow to a specified maximum.

        //

        // Parameters:

        //   capacity:

        //     The suggested starting size of the System.Text.StringBuilder.

        //

        //   maxCapacity:

        //     The maximum number of characters the current string can contain.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     maxCapacity is less than one, capacity is less than zero, or capacity is

        //     greater than maxCapacity.

        public StringBuilder(int capacity, int maxCapacity);

        //

        // Summary:

        //     Initializes a new instance of the System.Text.StringBuilder class using the

        //     specified string and capacity.

        //

        // Parameters:

        //   value:

        //     The string used to initialize the value of the instance. If value is null,

        //     the new System.Text.StringBuilder will contain the empty string (that is,

        //     it contains System.String.Empty).

        //

        //   capacity:

        //     The suggested starting size of the System.Text.StringBuilder.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     capacity is less than zero.

        public StringBuilder(string value, int capacity);

        //

        // Summary:

        //     Initializes a new instance of the System.Text.StringBuilder class from the

        //     specified substring and capacity.

        //

        // Parameters:

        //   value:

        //     The string that contains the substring used to initialize the value of this

        //     instance. If value is null, the new System.Text.StringBuilder will contain

        //     the empty string (that is, it contains 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 System.Text.StringBuilder.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     capacity is less than zero.  -or- startIndex plus length is not a position

        //     within value.

        public StringBuilder(string value, int startIndex, int length, int capacity);

        // Summary:

        //     Gets or sets the maximum number of characters that can be contained in the

        //     memory allocated by the current instance.

        //

        // Returns:

        //     The maximum number of characters that can be contained in the memory allocated

        //     by the current instance.

        //

        // Exceptions:

        //   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.

        public int Capacity { get; set; }

        //

        // Summary:

        //     Gets or sets the length of the current System.Text.StringBuilder object.

        //

        // Returns:

        //     The length of this instance.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     The value specified for a set operation is less than zero or greater than

        //     System.Text.StringBuilder.MaxCapacity.

        public int Length { get; set; }

        //

        // Summary:

        //     Gets the maximum capacity of this instance.

        //

        // Returns:

        //     The maximum number of characters this instance can hold.

        public int MaxCapacity { get; }

        // Summary:

        //     Gets or sets the character at the specified character position in this instance.

        //

        // Parameters:

        //   index:

        //     The position of the character.

        //

        // Returns:

        //     The Unicode character at position index.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is outside the bounds of this instance while setting a character.

        //

        //   System.IndexOutOfRangeException:

        //     index is outside the bounds of this instance while getting a character.

        public char this[int index] { get; set; }

        // Summary:

        //     Appends the string representation of a specified Boolean value to the end

        //     of this instance.

        //

        // Parameters:

        //   value:

        //     The Boolean value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(bool value);

        //

        // Summary:

        //     Appends the string representation of a specified 8-bit unsigned integer to

        //     the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(byte value);

        //

        // Summary:

        //     Appends the string representation of a specified Unicode character to the

        //     end of this instance.

        //

        // Parameters:

        //   value:

        //     The Unicode character to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(char value);

        //

        // Summary:

        //     Appends the string representation of the Unicode characters in a specified

        //     array to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The array of characters to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(char[] value);

        //

        // Summary:

        //     Appends the string representation of a specified decimal number to the end

        //     of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(decimal value);

        //

        // Summary:

        //     Appends the string representation of a specified double-precision floating-point

        //     number to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(double value);

        //

        // Summary:

        //     Appends the string representation of a specified single-precision floating-point

        //     number to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(float value);

        //

        // Summary:

        //     Appends the string representation of a specified 32-bit signed integer to

        //     the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(int value);

        //

        // Summary:

        //     Appends the string representation of a specified 64-bit signed integer to

        //     the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(long value);

        //

        // Summary:

        //     Appends the string representation of a specified object to the end of this

        //     instance.

        //

        // Parameters:

        //   value:

        //     The object to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(object value);

        //

        // Summary:

        //     Appends the string representation of a specified 8-bit signed integer to

        //     the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Append(sbyte value);

        //

        // Summary:

        //     Appends the string representation of a specified 16-bit signed integer to

        //     the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(short value);

        //

        // Summary:

        //     Appends a copy of the specified string to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The System.String to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(string value);

        //

        // Summary:

        //     Appends the string representation of a specified 32-bit unsigned integer

        //     to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Append(uint value);

        //

        // Summary:

        //     Appends the string representation of a specified 64-bit unsigned integer

        //     to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Append(ulong value);

        //

        // Summary:

        //     Appends the string representation of a specified 16-bit unsigned integer

        //     to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The value to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Append(ushort value);

        //

        // Summary:

        //     Appends a specified number of copies of the string representation of a Unicode

        //     character to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The character to append.

        //

        //   repeatCount:

        //     The number of times to append value.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     repeatCount is less than zero.  -or- Enlarging the value of this instance

        //     would exceed System.Text.StringBuilder.MaxCapacity.

        //

        //   System.OutOfMemoryException:

        //     Out of memory.

        public StringBuilder Append(char value, int repeatCount);

        //

        // Summary:

        //     Appends the string representation of a specified subarray of Unicode characters

        //     to the end of this instance.

        //

        // Parameters:

        //   value:

        //     A character array.

        //

        //   startIndex:

        //     The starting position in value.

        //

        //   charCount:

        //     The number of characters to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     value is null, and startIndex and charCount are not zero.

        //

        //   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 System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(char[] value, int startIndex, int charCount);

        //

        // Summary:

        //     Appends a copy of a specified substring to the end of this instance.

        //

        // Parameters:

        //   value:

        //     The System.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.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     value is null, and startIndex and count are not zero.

        //

        //   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 System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Append(string value, int startIndex, int count);

        //

        // Summary:

        //     Appends a formatted string, which contains zero or more format specifications,

        //     to this instance. Each format specification is replaced by the string representation

        //     of a corresponding object argument.

        //

        // Parameters:

        //   format:

        //     A composite format string.

        //

        //   arg0:

        //     An object to format.

        //

        // Returns:

        //     A reference to this instance with format appended. Any format specification

        //     in format is replaced by the string representation of the corresponding object

        //     argument.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     format is null.

        //

        //   System.FormatException:

        //     format is invalid.

        //

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder AppendFormat(string format, object arg0);

        //

        // Summary:

        //     Appends a formatted string, which contains zero or more format specifications,

        //     to this instance. Each format specification is replaced by the string representation

        //     of a corresponding object argument.

        //

        // Parameters:

        //   format:

        //     A composite format string.

        //

        //   args:

        //     An array of objects to format.

        //

        // Returns:

        //     A reference to this instance with format appended. Any format specification

        //     in format is replaced by the string representation of the corresponding object

        //     argument.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     format or args is null.

        //

        //   System.FormatException:

        //     format is invalid.

        //

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder AppendFormat(string format, params object[] args);

        //

        // Summary:

        //     Appends a formatted string, which contains zero or more format specifications,

        //     to this instance. Each format specification is replaced by the string representation

        //     of a corresponding object argument.

        //

        // Parameters:

        //   provider:

        //     An System.IFormatProvider that supplies culture-specific formatting information.

        //

        //   format:

        //     A composite format string.

        //

        //   args:

        //     An array of objects to format.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed. After

        //     the append operation, this instance contains any data that existed before

        //     the operation, suffixed by a copy of format where any format specification

        //     is replaced by the string representation of the corresponding object argument.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     format is null.

        //

        //   System.FormatException:

        //     format is invalid.

        //

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder AppendFormat(IFormatProvider provider, string format, params object[] args);

        //

        // Summary:

        //     Appends a formatted string, which contains zero or more format specifications,

        //     to this instance. Each format specification is replaced by the string representation

        //     of a corresponding object argument.

        //

        // Parameters:

        //   format:

        //     A composite format string.

        //

        //   arg0:

        //     The first object to format.

        //

        //   arg1:

        //     The second object to format.

        //

        // Returns:

        //     A reference to this instance with format appended. Any format specification

        //     in format is replaced by the string representation of the corresponding object

        //     argument.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     format is null.

        //

        //   System.FormatException:

        //     format is invalid.

        //

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder AppendFormat(string format, object arg0, object arg1);

        //

        // Summary:

        //     Appends a formatted string, which contains zero or more format specifications,

        //     to this instance. Each format specification is replaced by the string representation

        //     of a corresponding object argument.

        //

        // Parameters:

        //   format:

        //     A composite format string.

        //

        //   arg0:

        //     The first object to format.

        //

        //   arg1:

        //     The second object to format.

        //

        //   arg2:

        //     The third object to format.

        //

        // Returns:

        //     A reference to this instance with format appended. Any format specification

        //     in format is replaced by the string representation of the corresponding object

        //     argument.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     format is null.

        //

        //   System.FormatException:

        //     format is invalid.

        //

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder AppendFormat(string format, object arg0, object arg1, object arg2);

        //

        // Summary:

        //     Appends the default line terminator to the end of the current System.Text.StringBuilder

        //     object.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [ComVisible(false)]

        public StringBuilder AppendLine();

        //

        // Summary:

        //     Appends a copy of the specified string and the default line terminator to

        //     the end of the current System.Text.StringBuilder object.

        //

        // Parameters:

        //   value:

        //     The System.String to append.

        //

        // Returns:

        //     A reference to this instance after the append operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [ComVisible(false)]

        public StringBuilder AppendLine(string value);

        //

        // Summary:

        //     Copies the characters from a specified segment of this instance to a specified

        //     segment of a destination System.Char array.

        //

        // Parameters:

        //   sourceIndex:

        //     The starting position in this instance where characters will be copied from.

        //     The index is zero-based.

        //

        //   destination:

        //     The System.Char array where characters will be copied to.

        //

        //   destinationIndex:

        //     The starting position in destination where characters will be copied to.

        //     The index is zero-based.

        //

        //   count:

        //     The number of characters to be copied.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     destination is null.

        //

        //   System.ArgumentOutOfRangeException:

        //     sourceIndex, destinationIndex, or count, is less than zero.  -or- sourceIndex

        //     is greater than the length of this instance.

        //

        //   System.ArgumentException:

        //     sourceIndex + count is greater than the length of this instance.  -or- destinationIndex

        //     + count is greater than the length of destination.

        [ComVisible(false)]

        public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count);

        //

        // Summary:

        //     Ensures that the capacity of this instance of System.Text.StringBuilder is

        //     at least the specified value.

        //

        // Parameters:

        //   capacity:

        //     The minimum capacity to ensure.

        //

        // Returns:

        //     The new capacity of this instance.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     capacity is less than zero.  -or- Enlarging the value of this instance would

        //     exceed System.Text.StringBuilder.MaxCapacity.

        public int EnsureCapacity(int capacity);

        //

        // Summary:

        //     Returns a value indicating whether this instance is equal to a specified

        //     object.

        //

        // Parameters:

        //   sb:

        //     An object to compare with this instance or null.

        //

        // Returns:

        //     true if this instance and sb have equal string, System.Text.StringBuilder.Capacity,

        //     and System.Text.StringBuilder.MaxCapacity values; otherwise, false.

        public bool Equals(StringBuilder sb);

        //

        // Summary:

        //     Inserts the string representation of a Boolean value into this instance at

        //     the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, bool value);

        //

        // Summary:

        //     Inserts the string representation of a specified 8-bit unsigned integer into

        //     this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, byte value);

        //

        // Summary:

        //     Inserts the string representation of a specified Unicode character into this

        //     instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, char value);

        //

        // Summary:

        //     Inserts the string representation of a specified array of Unicode characters

        //     into this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The character array to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, char[] value);

        //

        // Summary:

        //     Inserts the string representation of a decimal number into this instance

        //     at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, decimal value);

        //

        // Summary:

        //     Inserts the string representation of a double-precision floating-point number

        //     into this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, double value);

        //

        // Summary:

        //     Inserts the string representation of a single-precision floating point number

        //     into this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, float value);

        //

        // Summary:

        //     Inserts the string representation of a specified 32-bit signed integer into

        //     this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, int value);

        //

        // Summary:

        //     Inserts the string representation of a 64-bit signed integer into this instance

        //     at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, long value);

        //

        // Summary:

        //     Inserts the string representation of an object into this instance at the

        //     specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The object to insert or null.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, object value);

        //

        // Summary:

        //     Inserts the string representation of a specified 8-bit signed integer into

        //     this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Insert(int index, sbyte value);

        //

        // Summary:

        //     Inserts the string representation of a specified 16-bit signed integer into

        //     this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, short value);

        //

        // Summary:

        //     Inserts a string into this instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The string to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the current length of this instance.

        //

        //   System.OutOfMemoryException:

        //     The current length of this System.Text.StringBuilder object plus the length

        //     of value exceeds System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, string value);

        //

        // Summary:

        //     Inserts the string representation of a 32-bit unsigned integer into this

        //     instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Insert(int index, uint value);

        //

        // Summary:

        //     Inserts the string representation of a 64-bit unsigned integer into this

        //     instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Insert(int index, ulong value);

        //

        // Summary:

        //     Inserts the string representation of a 16-bit unsigned integer into this

        //     instance at the specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The value to insert.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the length of this instance.  -or-

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        [CLSCompliant(false)]

        public StringBuilder Insert(int index, ushort value);

        //

        // Summary:

        //     Inserts one or more copies of a specified string into this instance at the

        //     specified character position.

        //

        // Parameters:

        //   index:

        //     The position in this instance where insertion begins.

        //

        //   value:

        //     The string to insert.

        //

        //   count:

        //     The number of times to insert value.

        //

        // Returns:

        //     A reference to this instance after insertion has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     index is less than zero or greater than the current length of this instance.

        //      -or- count is less than zero.

        //

        //   System.OutOfMemoryException:

        //     The current length of this System.Text.StringBuilder object plus the length

        //     of value times count exceeds System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, string value, int count);

        //

        // Summary:

        //     Inserts the string representation of a specified subarray of Unicode characters

        //     into this instance at the specified character position.

        //

        // Parameters:

        //   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.

        //

        // Returns:

        //     A reference to this instance after the insert operation has completed.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     value is null, and startIndex and charCount are not zero.

        //

        //   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 System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Insert(int index, char[] value, int startIndex, int charCount);

        //

        // Summary:

        //     Removes the specified range of characters from this instance.

        //

        // Parameters:

        //   startIndex:

        //     The zero-based position in this instance where removal begins.

        //

        //   length:

        //     The number of characters to remove.

        //

        // Returns:

        //     A reference to this instance after the excise operation has completed.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     If startIndex or length is less than zero, or startIndex + length is greater

        //     than the length of this instance.

        public StringBuilder Remove(int startIndex, int length);

        //

        // Summary:

        //     Replaces all occurrences of a specified character in this instance with another

        //     specified character.

        //

        // Parameters:

        //   oldChar:

        //     The character to replace.

        //

        //   newChar:

        //     The character that replaces oldChar.

        //

        // Returns:

        //     A reference to this instance with oldChar replaced by newChar.

        public StringBuilder Replace(char oldChar, char newChar);

        //

        // Summary:

        //     Replaces all occurrences of a specified string in this instance with another

        //     specified string.

        //

        // Parameters:

        //   oldValue:

        //     The string to replace.

        //

        //   newValue:

        //     The string that replaces oldValue, or null.

        //

        // Returns:

        //     A reference to this instance with all instances of oldValue replaced by newValue.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     oldValue is null.

        //

        //   System.ArgumentException:

        //     The length of oldvalue is zero.

        //

        //   System.ArgumentOutOfRangeException:

        //     Enlarging the value of this instance would exceed System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Replace(string oldValue, string newValue);

        //

        // Summary:

        //     Replaces, within a substring of this instance, all occurrences of a specified

        //     character with another specified character.

        //

        // Parameters:

        //   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.

        //

        // Returns:

        //     A reference to this instance with oldChar replaced by newChar in the range

        //     from startIndex to startIndex + count -1.

        //

        // Exceptions:

        //   System.ArgumentOutOfRangeException:

        //     startIndex + count is greater than the length of the value of this instance.

        //      -or- startIndex or count is less than zero.

        public StringBuilder Replace(char oldChar, char newChar, int startIndex, int count);

        //

        // Summary:

        //     Replaces, within a substring of this instance, all occurrences of a specified

        //     string with another specified string.

        //

        // Parameters:

        //   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.

        //

        // Returns:

        //     A reference to this instance with all instances of oldValue replaced by newValue

        //     in the range from startIndex to startIndex + count - 1.

        //

        // Exceptions:

        //   System.ArgumentNullException:

        //     oldValue is null.

        //

        //   System.ArgumentException:

        //     The length of oldvalue is zero.

        //

        //   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 System.Text.StringBuilder.MaxCapacity.

        public StringBuilder Replace(string oldValue, string newValue, int startIndex, int count);

        //

        // Summary:

        //     Converts the value of this instance to a System.String.

        //

        // Returns:

        //     A string whose value is the same as this instance.

        public override string ToString();

        //

        // Summary:

        //     Converts the value of a substring of this instance to a System.String.

        //

        // Parameters:

        //   startIndex:

        //     The starting position of the substring in this instance.

        //

        //   length:

        //     The length of the substring.

        //

        // Returns:

        //     A string whose value is the same as the specified substring of this instance.

        //

        // Exceptions:

        //   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.

        public string ToString(int startIndex, int length);

    }

}