CodeAttributeArgumentCollection.AddRange Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Copia os elementos do array especificado CodeAttributeArgument para o final da coleção.
Sobrecargas
| Name | Description |
|---|---|
| AddRange(CodeAttributeArgument[]) |
Copia os elementos do array especificado CodeAttributeArgument para o final da coleção. |
| AddRange(CodeAttributeArgumentCollection) |
Copia o conteúdo de outro CodeAttributeArgumentCollection objeto para o final da coleção. |
AddRange(CodeAttributeArgument[])
Copia os elementos do array especificado CodeAttributeArgument para o final da coleção.
public:
void AddRange(cli::array <System::CodeDom::CodeAttributeArgument ^> ^ value);
public void AddRange(System.CodeDom.CodeAttributeArgument[] value);
member this.AddRange : System.CodeDom.CodeAttributeArgument[] -> unit
Public Sub AddRange (value As CodeAttributeArgument())
Parâmetros
- value
- CodeAttributeArgument[]
Um array de tipos CodeAttributeArgument que contém os objetos a adicionar à coleção.
Exceções
value é null.
Exemplos
O exemplo seguinte demonstra como usar o AddRange(CodeAttributeArgument[]) método overload para adicionar os membros de um CodeAttributeArgument array a um CodeAttributeArgumentCollection.
// Adds an array of CodeAttributeArgument objects to the collection.
CodeAttributeArgument[] arguments = { new CodeAttributeArgument(), new CodeAttributeArgument() };
collection.AddRange( arguments );
// Adds a collection of CodeAttributeArgument objects to
// the collection.
CodeAttributeArgumentCollection argumentsCollection = new CodeAttributeArgumentCollection();
argumentsCollection.Add( new CodeAttributeArgument("TestBooleanArgument", new CodePrimitiveExpression(true)) );
argumentsCollection.Add( new CodeAttributeArgument("TestIntArgument", new CodePrimitiveExpression(1)) );
collection.AddRange( argumentsCollection );
' Adds an array of CodeAttributeArgument objects to the collection.
Dim arguments As CodeAttributeArgument() = {New CodeAttributeArgument(), New CodeAttributeArgument()}
collection.AddRange(arguments)
' Adds a collection of CodeAttributeArgument objects to the collection.
Dim argumentsCollection As New CodeAttributeArgumentCollection()
argumentsCollection.Add(New CodeAttributeArgument("TestBooleanArgument", New CodePrimitiveExpression(True)))
argumentsCollection.Add(New CodeAttributeArgument("TestIntArgument", New CodePrimitiveExpression(1)))
collection.AddRange(argumentsCollection)
Ver também
Aplica-se a
AddRange(CodeAttributeArgumentCollection)
Copia o conteúdo de outro CodeAttributeArgumentCollection objeto para o final da coleção.
public:
void AddRange(System::CodeDom::CodeAttributeArgumentCollection ^ value);
public void AddRange(System.CodeDom.CodeAttributeArgumentCollection value);
member this.AddRange : System.CodeDom.CodeAttributeArgumentCollection -> unit
Public Sub AddRange (value As CodeAttributeArgumentCollection)
Parâmetros
A CodeAttributeArgumentCollection que contém os objetos a adicionar à coleção.
Exceções
value é null.
Exemplos
O exemplo seguinte demonstra como usar o AddRange(CodeAttributeArgumentCollection) método sobrecarga para adicionar os membros de um CodeAttributeArgumentCollection objeto a outro CodeAttributeArgumentCollection.
// Adds an array of CodeAttributeArgument objects to the collection.
CodeAttributeArgument[] arguments = { new CodeAttributeArgument(), new CodeAttributeArgument() };
collection.AddRange( arguments );
// Adds a collection of CodeAttributeArgument objects to
// the collection.
CodeAttributeArgumentCollection argumentsCollection = new CodeAttributeArgumentCollection();
argumentsCollection.Add( new CodeAttributeArgument("TestBooleanArgument", new CodePrimitiveExpression(true)) );
argumentsCollection.Add( new CodeAttributeArgument("TestIntArgument", new CodePrimitiveExpression(1)) );
collection.AddRange( argumentsCollection );
' Adds an array of CodeAttributeArgument objects to the collection.
Dim arguments As CodeAttributeArgument() = {New CodeAttributeArgument(), New CodeAttributeArgument()}
collection.AddRange(arguments)
' Adds a collection of CodeAttributeArgument objects to the collection.
Dim argumentsCollection As New CodeAttributeArgumentCollection()
argumentsCollection.Add(New CodeAttributeArgument("TestBooleanArgument", New CodePrimitiveExpression(True)))
argumentsCollection.Add(New CodeAttributeArgument("TestIntArgument", New CodePrimitiveExpression(1)))
collection.AddRange(argumentsCollection)