CodeExpressionCollection::AddRange Method (array<CodeExpression^>^)
.NET Framework (current version)
Copies the elements of the specified array to the end of the collection.
Assembly: System (in System.dll)
Parameters
- value
-
Type:
array<System.CodeDom::CodeExpression^>^
An array of type CodeExpression that contains the objects to add to the collection.
| Exception | Condition |
|---|---|
| ArgumentNullException | value is null. |
The following example demonstrates how to use the AddRange(array<CodeExpression^>^) method overload to add the members of a CodeExpression array to a CodeExpressionCollection.
// Adds an array of CodeExpression objects to the collection. array<CodeExpression^>^expressions = {gcnew CodePrimitiveExpression( true ),gcnew CodePrimitiveExpression( true )}; collection->AddRange( expressions ); // Adds a collection of CodeExpression objects to the collection. CodeExpressionCollection^ expressionsCollection = gcnew CodeExpressionCollection; expressionsCollection->Add( gcnew CodePrimitiveExpression( true ) ); expressionsCollection->Add( gcnew CodePrimitiveExpression( true ) ); collection->AddRange( expressionsCollection );
.NET Framework
Available since 1.1
Available since 1.1
Show: