CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Método

Definición

Agrega a la colección el objeto CodeAttributeArgument especificado.

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

Parámetros

value
CodeAttributeArgument

Objeto CodeAttributeArgument que se agrega.

Devoluciones

Índice donde se insertó el nuevo elemento.

Ejemplos

En el ejemplo siguiente se muestra cómo agregar un CodeAttributeArgument objeto a una CodeAttributeArgumentCollection instancia de .

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

Se aplica a

Consulte también