CommaDelimitedStringCollection.Insert(Int32, String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Ajoute un élément de chaîne à la collection à l’index spécifié.
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)
Paramètres
- index
- Int32
Index de la collection à laquelle le nouvel élément sera ajouté.
- value
- String
Valeur du nouvel élément à ajouter à la collection.
Exemples
L’exemple de code suivant montre comment utiliser la Insert méthode. Cet exemple de code fait partie d’un exemple plus large fourni pour la vue d’ensemble de la CommaDelimitedStringCollection classe.
// Insert a new element in the collection.
myStrCollection.Insert(myStrCollection.Count, "userNameX");
' Insert a new element in the collection.
myStrCollection.Insert(myStrCollection.Count, "userNameX")
Remarques
Cette méthode entraîne la définition truede la IsModified propriété sur .