CodeCommentStatementCollection.AddRange 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 CodeCommentStatement 배열의 요소를 컬렉션의 끝에 복사합니다.
오버로드
| AddRange(CodeCommentStatement[]) |
지정된 CodeCommentStatement 배열의 요소를 컬렉션의 끝에 복사합니다. |
| AddRange(CodeCommentStatementCollection) |
다른 CodeCommentStatementCollection 개체의 내용을 컬렉션 끝에 복사합니다. |
AddRange(CodeCommentStatement[])
지정된 CodeCommentStatement 배열의 요소를 컬렉션의 끝에 복사합니다.
public:
void AddRange(cli::array <System::CodeDom::CodeCommentStatement ^> ^ value);
public void AddRange (System.CodeDom.CodeCommentStatement[] value);
member this.AddRange : System.CodeDom.CodeCommentStatement[] -> unit
Public Sub AddRange (value As CodeCommentStatement())
매개 변수
- value
- CodeCommentStatement[]
컬렉션에 추가할 개체가 들어 있는 CodeCommentStatement 형식의 배열입니다.
예외
value이(가) null인 경우
예제
다음 예제에서는 메서드 오버로드를 사용하여 AddRange(CodeCommentStatement[]) 배열CodeCommentStatementCollection의 멤버를 CodeCommentStatement 에 추가하는 방법을 보여 줍니다.
// Adds an array of CodeCommentStatement objects to the collection.
array<CodeCommentStatement^>^comments = {gcnew CodeCommentStatement( "Test comment" ),gcnew CodeCommentStatement( "Another test comment" )};
collection->AddRange( comments );
// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection^ commentsCollection = gcnew CodeCommentStatementCollection;
commentsCollection->Add( gcnew CodeCommentStatement( "Test comment" ) );
commentsCollection->Add( gcnew CodeCommentStatement( "Another test comment" ) );
collection->AddRange( commentsCollection );
// Adds an array of CodeCommentStatement objects to the collection.
CodeCommentStatement[] comments = { new CodeCommentStatement("Test comment"), new CodeCommentStatement("Another test comment") };
collection.AddRange( comments );
// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection commentsCollection = new CodeCommentStatementCollection();
commentsCollection.Add( new CodeCommentStatement("Test comment") );
commentsCollection.Add( new CodeCommentStatement("Another test comment") );
collection.AddRange( commentsCollection );
' Adds an array of CodeCommentStatement objects to the collection.
Dim comments As CodeCommentStatement() = {New CodeCommentStatement("Test comment"), New CodeCommentStatement("Another test comment")}
collection.AddRange(comments)
' Adds a collection of CodeCommentStatement objects to the
' collection.
Dim commentsCollection As New CodeCommentStatementCollection()
commentsCollection.Add(New CodeCommentStatement("Test comment"))
commentsCollection.Add(New CodeCommentStatement("Another test comment"))
collection.AddRange(commentsCollection)
추가 정보
적용 대상
AddRange(CodeCommentStatementCollection)
다른 CodeCommentStatementCollection 개체의 내용을 컬렉션 끝에 복사합니다.
public:
void AddRange(System::CodeDom::CodeCommentStatementCollection ^ value);
public void AddRange (System.CodeDom.CodeCommentStatementCollection value);
member this.AddRange : System.CodeDom.CodeCommentStatementCollection -> unit
Public Sub AddRange (value As CodeCommentStatementCollection)
매개 변수
컬렉션에 추가할 개체가 들어 있는 CodeCommentStatementCollection입니다.
예외
value이(가) null인 경우
예제
다음 예제에서는 메서드 오버로드를 AddRange(CodeCommentStatementCollection) 사용하여 멤버를 서로 CodeCommentStatementCollection 추가하는 방법을 보여 줍니다.
// Adds an array of CodeCommentStatement objects to the collection.
array<CodeCommentStatement^>^comments = {gcnew CodeCommentStatement( "Test comment" ),gcnew CodeCommentStatement( "Another test comment" )};
collection->AddRange( comments );
// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection^ commentsCollection = gcnew CodeCommentStatementCollection;
commentsCollection->Add( gcnew CodeCommentStatement( "Test comment" ) );
commentsCollection->Add( gcnew CodeCommentStatement( "Another test comment" ) );
collection->AddRange( commentsCollection );
// Adds an array of CodeCommentStatement objects to the collection.
CodeCommentStatement[] comments = { new CodeCommentStatement("Test comment"), new CodeCommentStatement("Another test comment") };
collection.AddRange( comments );
// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection commentsCollection = new CodeCommentStatementCollection();
commentsCollection.Add( new CodeCommentStatement("Test comment") );
commentsCollection.Add( new CodeCommentStatement("Another test comment") );
collection.AddRange( commentsCollection );
' Adds an array of CodeCommentStatement objects to the collection.
Dim comments As CodeCommentStatement() = {New CodeCommentStatement("Test comment"), New CodeCommentStatement("Another test comment")}
collection.AddRange(comments)
' Adds a collection of CodeCommentStatement objects to the
' collection.
Dim commentsCollection As New CodeCommentStatementCollection()
commentsCollection.Add(New CodeCommentStatement("Test comment"))
commentsCollection.Add(New CodeCommentStatement("Another test comment"))
collection.AddRange(commentsCollection)