CodeTypeDeclarationCollection.Insert(Int32, CodeTypeDeclaration) Méthode

Définition

Insère l'objet CodeTypeDeclaration indiqué dans la collection à l'index spécifié.

public:
 void Insert(int index, System::CodeDom::CodeTypeDeclaration ^ value);
public void Insert (int index, System.CodeDom.CodeTypeDeclaration value);
member this.Insert : int * System.CodeDom.CodeTypeDeclaration -> unit
Public Sub Insert (index As Integer, value As CodeTypeDeclaration)

Paramètres

index
Int32

Index de base zéro dans lequel l'objet spécifié doit être inséré.

value
CodeTypeDeclaration

Objet CodeTypeDeclaration à insérer.

Exemples

L’exemple suivant montre comment utiliser la Insert méthode pour insérer un CodeTypeDeclaration objet dans un CodeTypeDeclarationCollection.

// Inserts a CodeTypeDeclaration at index 0 of the collection.
collection->Insert( 0, gcnew CodeTypeDeclaration( "TestType" ) );
// Inserts a CodeTypeDeclaration at index 0 of the collection.
collection.Insert( 0, new CodeTypeDeclaration("TestType") );
' Inserts a CodeTypeDeclaration at index 0 of the collection.
collection.Insert(0, New CodeTypeDeclaration("TestType"))

S’applique à

Voir aussi