CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Metoda

Definicja

Dodaje określony CodeAttributeArgument obiekt do kolekcji.

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

Parametry

value
CodeAttributeArgument

Obiekt do dodania CodeAttributeArgument .

Zwraca

Indeks, w którym został wstawiony nowy element.

Przykłady

W poniższym przykładzie pokazano, jak dodać CodeAttributeArgument obiekt do CodeAttributeArgumentCollection wystąpienia.

// 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)))

Dotyczy

Zobacz też