CodeAttributeArgumentCollection.AddRange Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Copia gli elementi della matrice di CodeAttributeArgument specificata alla fine dell'insieme.
Overload
| Nome | Descrizione |
|---|---|
| AddRange(CodeAttributeArgument[]) |
Copia gli elementi della matrice di CodeAttributeArgument specificata alla fine dell'insieme. |
| AddRange(CodeAttributeArgumentCollection) |
Copia il contenuto di un altro CodeAttributeArgumentCollection oggetto alla fine dell'insieme. |
AddRange(CodeAttributeArgument[])
Copia gli elementi della matrice di CodeAttributeArgument specificata alla fine dell'insieme.
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())
Parametri
- value
- CodeAttributeArgument[]
Matrice di tipo CodeAttributeArgument che contiene gli oggetti da aggiungere all'insieme.
Eccezioni
value è null.
Esempio
Nell'esempio seguente viene illustrato come usare l'overload del AddRange(CodeAttributeArgument[]) metodo per aggiungere i membri di una CodeAttributeArgument matrice a un oggetto 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)
Vedi anche
Si applica a
AddRange(CodeAttributeArgumentCollection)
Copia il contenuto di un altro CodeAttributeArgumentCollection oggetto alla fine dell'insieme.
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)
Parametri
Oggetto CodeAttributeArgumentCollection contenente gli oggetti da aggiungere all'insieme.
Eccezioni
value è null.
Esempio
Nell'esempio seguente viene illustrato come utilizzare l'overload del AddRange(CodeAttributeArgumentCollection) metodo per aggiungere i membri di un CodeAttributeArgumentCollection oggetto a un altro 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)