Windows apps
Collapse the table of content
Expand the table of content
Information
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.

CodeExpressionCollection::AddRange Method (CodeExpressionCollection^)

 

Copies the contents of another CodeExpressionCollection object to the end of the collection.

Namespace:   System.CodeDom
Assembly:  System (in System.dll)

public:
void AddRange(
	CodeExpressionCollection^ value
)

Parameters

value
Type: System.CodeDom::CodeExpressionCollection^

A CodeExpressionCollection that contains the objects to add to the collection.

Exception Condition
ArgumentNullException

value is null.

The following example demonstrates how to use the AddRange(CodeExpressionCollection^) method overload to add the members of one CodeExpressionCollection object to another 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
Return to top
Show:
© 2017 Microsoft