CommaDelimitedStringCollection.Insert(Int32, String) Metoda

Definice

Přidá element řetězce do kolekce v zadaném indexu.

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)

Parametry

index
Int32

Index v kolekci, do které bude přidán nový prvek.

value
String

Hodnota nového prvku, který chcete přidat do kolekce.

Příklady

Následující příklad kódu ukazuje, jak použít metodu Insert . Tento příklad kódu je součástí většího příkladu CommaDelimitedStringCollection pro přehled třídy.

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

Poznámky

Tato metoda způsobí, že IsModified vlastnost bude nastavena na truehodnotu .

Platí pro