The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
CodeAttributeArgumentCollection::AddRange Method (CodeAttributeArgumentCollection^)
.NET Framework (current version)
Copies the contents of another CodeAttributeArgumentCollection object to the end of the collection.
Assembly: System (in System.dll)
Parameters
- value
-
Type:
System.CodeDom::CodeAttributeArgumentCollection^
A CodeAttributeArgumentCollection that contains the objects to add to the collection.
| Exception | Condition |
|---|---|
| ArgumentNullException | value is null. |
The following example demonstrates how to use the AddRange(CodeAttributeArgumentCollection^) method overload to add the members of one CodeAttributeArgumentCollection object to another CodeAttributeArgumentCollection.
// Adds an array of CodeAttributeArgument objects to the collection. array<CodeAttributeArgument^>^arguments = {gcnew CodeAttributeArgument,gcnew CodeAttributeArgument}; collection->AddRange( arguments ); // Adds a collection of CodeAttributeArgument objects to // the collection. CodeAttributeArgumentCollection^ argumentsCollection = gcnew CodeAttributeArgumentCollection; argumentsCollection->Add( gcnew CodeAttributeArgument( "TestBooleanArgument",gcnew CodePrimitiveExpression( true ) ) ); argumentsCollection->Add( gcnew CodeAttributeArgument( "TestIntArgument",gcnew CodePrimitiveExpression( 1 ) ) ); collection->AddRange( argumentsCollection );
.NET Framework
Available since 1.1
Available since 1.1
Show: