Partilhar via


CodeExpressionCollection.AddRange Método

Definição

Copia os elementos da matriz especificada para o fim da coleção.

Sobrecargas

AddRange(CodeExpression[])

Copia os elementos da matriz especificada para o fim da coleção.

AddRange(CodeExpressionCollection)

Copia o conteúdo de outro objeto CodeExpressionCollection para o final da coleção.

AddRange(CodeExpression[])

Origem:
CodeExpressionCollection.cs
Origem:
CodeExpressionCollection.cs
Origem:
CodeExpressionCollection.cs

Copia os elementos da matriz especificada para o fim da coleção.

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

Parâmetros

value
CodeExpression[]

Uma matriz do tipo CodeExpression que contém os objetos a serem adicionados à coleção.

Exceções

value é null.

Exemplos

O exemplo a seguir demonstra como usar a sobrecarga de AddRange(CodeExpression[]) método para adicionar os membros de uma CodeExpression matriz a um 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 );
// Adds an array of CodeExpression objects to the collection.
CodeExpression[] expressions = { new CodePrimitiveExpression(true), new CodePrimitiveExpression(true) };
collection.AddRange( expressions );

// Adds a collection of CodeExpression objects to the collection.
CodeExpressionCollection expressionsCollection = new CodeExpressionCollection();
expressionsCollection.Add( new CodePrimitiveExpression(true) );
expressionsCollection.Add( new CodePrimitiveExpression(true) );
collection.AddRange( expressionsCollection );
' Adds an array of CodeExpression objects to the collection.
Dim expressions As CodeExpression() = {New CodePrimitiveExpression(True), New CodePrimitiveExpression(True)}
collection.AddRange(expressions)

' Adds a collection of CodeExpression objects to the collection.
Dim expressionsCollection As New CodeExpressionCollection()
expressionsCollection.Add(New CodePrimitiveExpression(True))
expressionsCollection.Add(New CodePrimitiveExpression(True))
collection.AddRange(expressionsCollection)

Confira também

Aplica-se a

AddRange(CodeExpressionCollection)

Origem:
CodeExpressionCollection.cs
Origem:
CodeExpressionCollection.cs
Origem:
CodeExpressionCollection.cs

Copia o conteúdo de outro objeto CodeExpressionCollection para o final da coleção.

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

Parâmetros

value
CodeExpressionCollection

Um CodeExpressionCollection que contém os objetos a serem adicionados à coleção.

Exceções

value é null.

Exemplos

O exemplo a seguir demonstra como usar a sobrecarga de AddRange(CodeExpressionCollection) método para adicionar os membros de um CodeExpressionCollection objeto a outro 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 );
// Adds an array of CodeExpression objects to the collection.
CodeExpression[] expressions = { new CodePrimitiveExpression(true), new CodePrimitiveExpression(true) };
collection.AddRange( expressions );

// Adds a collection of CodeExpression objects to the collection.
CodeExpressionCollection expressionsCollection = new CodeExpressionCollection();
expressionsCollection.Add( new CodePrimitiveExpression(true) );
expressionsCollection.Add( new CodePrimitiveExpression(true) );
collection.AddRange( expressionsCollection );
' Adds an array of CodeExpression objects to the collection.
Dim expressions As CodeExpression() = {New CodePrimitiveExpression(True), New CodePrimitiveExpression(True)}
collection.AddRange(expressions)

' Adds a collection of CodeExpression objects to the collection.
Dim expressionsCollection As New CodeExpressionCollection()
expressionsCollection.Add(New CodePrimitiveExpression(True))
expressionsCollection.Add(New CodePrimitiveExpression(True))
collection.AddRange(expressionsCollection)

Confira também

Aplica-se a