Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Inserts one or more copies of a specified string into this instance at the specified character position.
Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Function Insert ( _
index As Integer, _
value As String, _
count As Integer _
) As StringBuilder
public StringBuilder Insert(
int index,
string value,
int count
)
public:
StringBuilder^ Insert(
int index,
String^ value,
int count
)
member Insert :
index:int *
value:string *
count:int -> StringBuilder
public function Insert(
index : int,
value : String,
count : int
) : StringBuilder
Parameters
- index
Type: System. . :: . .Int32
The position in this instance where insertion begins.
- value
Type: System. . :: . .String
The string to insert.
- count
Type: System. . :: . .Int32
The number of times to insert value.
Return Value
Type: System.Text. . :: . .StringBuilder
A reference to this instance after insertion has completed.
Remarks
Existing characters are shifted to make room for the new text. The capacity of this instance is adjusted as needed.
This StringBuilder object is not changed if value is null Nothing nullptr unit a null reference (Nothing in Visual Basic) , value is not null Nothing nullptr unit a null reference (Nothing in Visual Basic) but its length is zero, or count is zero.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.