CodeParameterDeclarationExpressionCollection.AddRange Method

Definition

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

Overloads

AddRange(CodeParameterDeclarationExpression[])

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

AddRange(CodeParameterDeclarationExpressionCollection)

Adds the contents of another CodeParameterDeclarationExpressionCollection to the end of the collection.

AddRange(CodeParameterDeclarationExpression[])

Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs

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

C#
public void AddRange(System.CodeDom.CodeParameterDeclarationExpression[] value);

Parameters

value
CodeParameterDeclarationExpression[]

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

Exceptions

value is null.

Examples

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

C#
// 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 );

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

AddRange(CodeParameterDeclarationExpressionCollection)

Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs
Source:
CodeParameterDeclarationExpressionCollection.cs

Adds the contents of another CodeParameterDeclarationExpressionCollection to the end of the collection.

C#
public void AddRange(System.CodeDom.CodeParameterDeclarationExpressionCollection value);

Parameters

value
CodeParameterDeclarationExpressionCollection

A CodeParameterDeclarationExpressionCollection containing the objects to add to the collection.

Exceptions

value is null.

Examples

The following example demonstrates how to use the AddRange(CodeParameterDeclarationExpressionCollection) method overload to add the members of one CodeParameterDeclarationExpressionCollection object to another CodeParameterDeclarationExpressionCollection.

C#
// 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 );

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9