Share via


CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Methode

Definition

Fügt der Auflistung das angegebene CodeAttributeArgument-Objekt hinzu.

public:
 int Add(System::CodeDom::CodeAttributeArgument ^ value);
public int Add (System.CodeDom.CodeAttributeArgument value);
member this.Add : System.CodeDom.CodeAttributeArgument -> int
Public Function Add (value As CodeAttributeArgument) As Integer

Parameter

value
CodeAttributeArgument

Das hinzuzufügende CodeAttributeArgument-Objekt.

Gibt zurück

Der Index, an dem das neue Element eingefügt wurde.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie einem instance ein CodeAttributeArgumentCodeAttributeArgumentCollection Objekt hinzugefügt wird.

// Adds a CodeAttributeArgument to the collection.
collection->Add( gcnew CodeAttributeArgument( "Test Boolean Argument",gcnew CodePrimitiveExpression( true ) ) );
// Adds a CodeAttributeArgument to the collection.
collection.Add( new CodeAttributeArgument("Test Boolean Argument", new CodePrimitiveExpression(true)) );
' Adds a CodeAttributeArgument to the collection.
collection.Add(New CodeAttributeArgument("Test Boolean Argument", New CodePrimitiveExpression(True)))

Gilt für:

Weitere Informationen