CodeAttributeArgumentCollection.AddRange Metódus

Definíció

Másolja a megadott CodeAttributeArgument tömb elemeit a gyűjtemény végére.

Túlterhelések

Name Description
AddRange(CodeAttributeArgument[])

Másolja a megadott CodeAttributeArgument tömb elemeit a gyűjtemény végére.

AddRange(CodeAttributeArgumentCollection)

Másolja egy másik CodeAttributeArgumentCollection objektum tartalmát a gyűjtemény végére.

AddRange(CodeAttributeArgument[])

Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs

Másolja a megadott CodeAttributeArgument tömb elemeit a gyűjtemény végére.

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

Paraméterek

value
CodeAttributeArgument[]

Olyan típusú CodeAttributeArgument tömb, amely tartalmazza a gyűjteményhez hozzáadni kívánt objektumokat.

Kivételek

value az null.

Példák

Az alábbi példa bemutatja, hogyan lehet a AddRange(CodeAttributeArgument[]) metódust túlterheléssel hozzáadni egy CodeAttributeArgument tömb tagjaihoz 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)

Lásd még

A következőre érvényes:

AddRange(CodeAttributeArgumentCollection)

Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs
Forrás:
CodeAttributeArgumentCollection.cs

Másolja egy másik CodeAttributeArgumentCollection objektum tartalmát a gyűjtemény végére.

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)

Paraméterek

value
CodeAttributeArgumentCollection

A CodeAttributeArgumentCollection gyűjteményhez hozzáadni kívánt objektumokat tartalmazó objektum.

Kivételek

value az null.

Példák

Az alábbi példa bemutatja, hogyan használható a AddRange(CodeAttributeArgumentCollection) metódus túlterhelése az egyik CodeAttributeArgumentCollection objektum tagjainak a másikhoz CodeAttributeArgumentCollectionvaló hozzáadásához.

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

Lásd még

A következőre érvényes: