Removes the specified characters from the current StringBuilder.
[Visual Basic] Public Function Remove( _ ByVal startIndex As Integer, _ ByVal length As Integer _ ) As StringBuilder [C#] public StringBuilder Remove( int startIndex, int length ); [C++] public: StringBuilder* Remove( int startIndex, int length ); [JScript] public function Remove( startIndex : int, length : int ) : StringBuilder;
A reference to the current StringBuilder with length characters removed, beginning at startIndex.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | If startIndex or length is less than zero, or startIndex + length is greater than the length of the current StringBuilder. |
The length of the current StringBuilder is reduced by length, but the capacity is unaffected.
StringBuilder Class | StringBuilder Members | System.Text Namespace