CodeAttributeDeclarationCollection.Insert 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.
Insère l'objet CodeAttributeDeclaration indiqué dans la collection à l'index spécifié.
public:
void Insert(int index, System::CodeDom::CodeAttributeDeclaration ^ value);
public void Insert (int index, System.CodeDom.CodeAttributeDeclaration value);
member this.Insert : int * System.CodeDom.CodeAttributeDeclaration -> unit
Public Sub Insert (index As Integer, value As CodeAttributeDeclaration)
Paramètres
- index
- Int32
Index de base zéro dans lequel l'objet spécifié doit être inséré.
- value
- CodeAttributeDeclaration
Objet CodeAttributeDeclaration à insérer.
Exemples
L’exemple suivant montre comment utiliser la Insert méthode pour ajouter un CodeAttributeDeclaration objet au CodeAttributeDeclarationCollection.
// Inserts a CodeAttributeDeclaration at index 0 of the collection.
array<CodeAttributeArgument^>^temp4 = {gcnew CodeAttributeArgument( gcnew CodePrimitiveExpression( "Test Description" ) )};
collection->Insert( 0, gcnew CodeAttributeDeclaration( "DescriptionAttribute",temp4 ) );
// Inserts a CodeAttributeDeclaration at index 0 of the collection.
collection.Insert( 0, new CodeAttributeDeclaration("DescriptionAttribute", new CodeAttributeArgument(new CodePrimitiveExpression("Test Description"))) );
' Inserts a CodeAttributeDeclaration at index 0 of the collection.
collection.Insert(0, New CodeAttributeDeclaration("DescriptionAttribute", New CodeAttributeArgument(New CodePrimitiveExpression("Test Description"))))
S’applique à
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour