Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CodeParameterDeclarationExpressionCollection.AddRange Method (CodeParameterDeclarationExpression[])

Copies the elements of the specified array to the end of the collection.

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

public void AddRange(
	CodeParameterDeclarationExpression[] value


Type: System.CodeDom.CodeParameterDeclarationExpression[]

An array of type CodeParameterDeclarationExpression containing the objects to add to the collection.


value is null.

The following example demonstrates how to use the AddRange(CodeParameterDeclarationExpression[]) method overload to add the members of a CodeParameterDeclarationExpression array to a CodeParameterDeclarationExpressionCollection.

// Adds an array of CodeParameterDeclarationExpression objects  
// to the collection.
CodeParameterDeclarationExpression[] parameters = { new CodeParameterDeclarationExpression(typeof(int), "testIntArgument"), new CodeParameterDeclarationExpression(typeof(bool), "testBoolArgument") };
collection.AddRange( parameters );

// Adds a collection of CodeParameterDeclarationExpression objects  
// to the collection.
CodeParameterDeclarationExpressionCollection parametersCollection = new CodeParameterDeclarationExpressionCollection();
parametersCollection.Add( new CodeParameterDeclarationExpression(typeof(int), "testIntArgument") );
parametersCollection.Add( new CodeParameterDeclarationExpression(typeof(bool), "testBoolArgument") );
collection.AddRange( parametersCollection );

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft