CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Método

Definição

Adiciona o objeto especificado CodeAttributeArgument à coleção.

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

O CodeAttributeArgument objetivo a acrescentar.

Devoluções

O índice onde o novo elemento foi inserido.

Exemplos

O exemplo seguinte demonstra como adicionar um CodeAttributeArgument objeto a uma CodeAttributeArgumentCollection instância.

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

Aplica-se a

Ver também