CodeAttributeArgumentCollection.AddRange 메서드

정의

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

오버로드

Name Description
AddRange(CodeAttributeArgument[])

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

AddRange(CodeAttributeArgumentCollection)

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

AddRange(CodeAttributeArgument[])

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

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

매개 변수

value
CodeAttributeArgument[]

컬렉션에 추가할 개체를 포함하는 형식 CodeAttributeArgument 의 배열입니다.

예외

valuenull입니다.

예제

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

// Adds an array of CodeAttributeArgument objects to the collection.
CodeAttributeArgument[] arguments = { new CodeAttributeArgument(), new CodeAttributeArgument() };
collection.AddRange( arguments );

// Adds a collection of CodeAttributeArgument objects to
// the collection.
CodeAttributeArgumentCollection argumentsCollection = new CodeAttributeArgumentCollection();
argumentsCollection.Add( new CodeAttributeArgument("TestBooleanArgument", new CodePrimitiveExpression(true)) );
argumentsCollection.Add( new CodeAttributeArgument("TestIntArgument", new CodePrimitiveExpression(1)) );
collection.AddRange( argumentsCollection );
' Adds an array of CodeAttributeArgument objects to the collection.
Dim arguments As CodeAttributeArgument() = {New CodeAttributeArgument(), New CodeAttributeArgument()}
collection.AddRange(arguments)

' Adds a collection of CodeAttributeArgument objects to the collection.
Dim argumentsCollection As New CodeAttributeArgumentCollection()
argumentsCollection.Add(New CodeAttributeArgument("TestBooleanArgument", New CodePrimitiveExpression(True)))
argumentsCollection.Add(New CodeAttributeArgument("TestIntArgument", New CodePrimitiveExpression(1)))
collection.AddRange(argumentsCollection)

추가 정보

적용 대상

AddRange(CodeAttributeArgumentCollection)

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

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

매개 변수

value
CodeAttributeArgumentCollection

CodeAttributeArgumentCollection 컬렉션에 추가할 개체를 포함하는 A입니다.

예외

valuenull입니다.

예제

다음 예제에서는 메서드 오버로드를 AddRange(CodeAttributeArgumentCollection) 사용하여 한 CodeAttributeArgumentCollection 개체의 멤버를 다른 CodeAttributeArgumentCollection개체에 추가하는 방법을 보여 줍니다.

// Adds an array of CodeAttributeArgument objects to the collection.
CodeAttributeArgument[] arguments = { new CodeAttributeArgument(), new CodeAttributeArgument() };
collection.AddRange( arguments );

// Adds a collection of CodeAttributeArgument objects to
// the collection.
CodeAttributeArgumentCollection argumentsCollection = new CodeAttributeArgumentCollection();
argumentsCollection.Add( new CodeAttributeArgument("TestBooleanArgument", new CodePrimitiveExpression(true)) );
argumentsCollection.Add( new CodeAttributeArgument("TestIntArgument", new CodePrimitiveExpression(1)) );
collection.AddRange( argumentsCollection );
' Adds an array of CodeAttributeArgument objects to the collection.
Dim arguments As CodeAttributeArgument() = {New CodeAttributeArgument(), New CodeAttributeArgument()}
collection.AddRange(arguments)

' Adds a collection of CodeAttributeArgument objects to the collection.
Dim argumentsCollection As New CodeAttributeArgumentCollection()
argumentsCollection.Add(New CodeAttributeArgument("TestBooleanArgument", New CodePrimitiveExpression(True)))
argumentsCollection.Add(New CodeAttributeArgument("TestIntArgument", New CodePrimitiveExpression(1)))
collection.AddRange(argumentsCollection)

추가 정보

적용 대상