NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

String.Insert

Returns a new string with a specified value inserted at a specified position in this string.

[Visual Basic]
Public Function Insert( _
   ByVal startIndex As Integer, _
   ByVal value As String _
) As String
[C#]
public string Insert(
   int startIndex,
   string value
);
[C++]
public: String* Insert(
   int startIndex,
   String* value
);
[JScript]
public function Insert(
   startIndex : int,
   value : String
) : String;

Parameters

startIndex
The position to start inserting.
value
The string to insert.

Return Value

A new string with the string inserted at position of this string.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException If the beginning position is not within the range of this instance.
ArgumentOutOfRangeException If the string is null.

Remarks

The Insert method makes a new string by inserting a specified string (value) at a specified location (startIndex) in this string.

See Also

String Class | String Members | System Namespace