Modifier

Partager via


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

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

public:
 void AddRange(cli::array <System::CodeDom::CodeParameterDeclarationExpression ^> ^ value);
public void AddRange (System.CodeDom.CodeParameterDeclarationExpression[] value);
member this.AddRange : System.CodeDom.CodeParameterDeclarationExpression[] -> unit
Public Sub AddRange (value As CodeParameterDeclarationExpression())

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.

// Adds an array of CodeParameterDeclarationExpression objects 
// to the collection.
array<CodeParameterDeclarationExpression^>^parameters = {gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ),gcnew CodeParameterDeclarationExpression( bool::typeid,"testBoolArgument" )};
collection->AddRange( parameters );

// Adds a collection of CodeParameterDeclarationExpression objects 
// to the collection.
CodeParameterDeclarationExpressionCollection^ parametersCollection = gcnew CodeParameterDeclarationExpressionCollection;
parametersCollection->Add( gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ) );
parametersCollection->Add( gcnew CodeParameterDeclarationExpression( bool::typeid,"testBoolArgument" ) );
collection->AddRange( parametersCollection );
// 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 );
' Adds an array of CodeParameterDeclarationExpression objects 
' to the collection.
Dim parameters As CodeParameterDeclarationExpression() = {New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"), New CodeParameterDeclarationExpression(GetType(Boolean), "testBoolArgument")}
collection.AddRange(parameters)

' Adds a collection of CodeParameterDeclarationExpression 
' objects to the collection.
Dim parametersCollection As New CodeParameterDeclarationExpressionCollection()
parametersCollection.Add(New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"))
parametersCollection.Add(New CodeParameterDeclarationExpression(GetType(Boolean), "testBoolArgument"))
collection.AddRange(parametersCollection)

See also

Applies to

AddRange(CodeParameterDeclarationExpressionCollection)

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

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

public:
 void AddRange(System::CodeDom::CodeParameterDeclarationExpressionCollection ^ value);
public void AddRange (System.CodeDom.CodeParameterDeclarationExpressionCollection value);
member this.AddRange : System.CodeDom.CodeParameterDeclarationExpressionCollection -> unit
Public Sub AddRange (value As CodeParameterDeclarationExpressionCollection)

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.

// Adds an array of CodeParameterDeclarationExpression objects 
// to the collection.
array<CodeParameterDeclarationExpression^>^parameters = {gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ),gcnew CodeParameterDeclarationExpression( bool::typeid,"testBoolArgument" )};
collection->AddRange( parameters );

// Adds a collection of CodeParameterDeclarationExpression objects 
// to the collection.
CodeParameterDeclarationExpressionCollection^ parametersCollection = gcnew CodeParameterDeclarationExpressionCollection;
parametersCollection->Add( gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ) );
parametersCollection->Add( gcnew CodeParameterDeclarationExpression( bool::typeid,"testBoolArgument" ) );
collection->AddRange( parametersCollection );
// 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 );
' Adds an array of CodeParameterDeclarationExpression objects 
' to the collection.
Dim parameters As CodeParameterDeclarationExpression() = {New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"), New CodeParameterDeclarationExpression(GetType(Boolean), "testBoolArgument")}
collection.AddRange(parameters)

' Adds a collection of CodeParameterDeclarationExpression 
' objects to the collection.
Dim parametersCollection As New CodeParameterDeclarationExpressionCollection()
parametersCollection.Add(New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"))
parametersCollection.Add(New CodeParameterDeclarationExpression(GetType(Boolean), "testBoolArgument"))
collection.AddRange(parametersCollection)

See also

Applies to