編集

次の方法で共有


CommaDelimitedStringCollection.Insert(Int32, String) Method

Definition

Adds a string element to the collection at the specified index.

public:
 void Insert(int index, System::String ^ value);
public void Insert (int index, string value);
override this.Insert : int * string -> unit
Public Sub Insert (index As Integer, value As String)

Parameters

index
Int32

The index in the collection at which the new element will be added.

value
String

The value of the new element to add to the collection.

Examples

The following code example demonstrates how to use the Insert method. This code example is part of a larger example provided for the CommaDelimitedStringCollection class overview.

// Insert a new element in the collection.
myStrCollection.Insert(myStrCollection.Count, "userNameX");
' Insert a new element in the collection.
myStrCollection.Insert(myStrCollection.Count, "userNameX")

Remarks

This method causes the IsModified property to be set to true.

Applies to