다음을 통해 공유


CodeExpressionCollection.AddRange 메서드

정의

지정된 배열의 요소를 컬렉션의 끝에 복사합니다.

오버로드

AddRange(CodeExpression[])

지정된 배열의 요소를 컬렉션의 끝에 복사합니다.

AddRange(CodeExpressionCollection)

다른 CodeExpressionCollection 개체의 내용을 컬렉션 끝에 복사합니다.

AddRange(CodeExpression[])

Source:
CodeExpressionCollection.cs
Source:
CodeExpressionCollection.cs
Source:
CodeExpressionCollection.cs

지정된 배열의 요소를 컬렉션의 끝에 복사합니다.

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())

매개 변수

value
CodeExpression[]

컬렉션에 추가할 개체가 들어 있는 CodeExpression 형식의 배열입니다.

예외

value이(가) null인 경우

예제

다음 예제에서는 메서드 오버로드를 AddRange(CodeExpression[]) 사용하여 배열CodeExpressionCollection의 멤버를 CodeExpression 에 추가하는 방법을 보여 줍니다.

// 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)

추가 정보

적용 대상

AddRange(CodeExpressionCollection)

Source:
CodeExpressionCollection.cs
Source:
CodeExpressionCollection.cs
Source:
CodeExpressionCollection.cs

다른 CodeExpressionCollection 개체의 내용을 컬렉션 끝에 복사합니다.

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)

매개 변수

value
CodeExpressionCollection

컬렉션에 추가할 개체가 들어 있는 CodeExpressionCollection입니다.

예외

value이(가) null인 경우

예제

다음 예제에서는 메서드 오버로드를 AddRange(CodeExpressionCollection) 사용하여 한 CodeExpressionCollection 개체의 멤버를 다른 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)

추가 정보

적용 대상