CodeCommentStatementCollection.AddRange メソッド

定義

指定した 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 型の配列。

例外

valuenullです。

次の例では、 AddRange(CodeCommentStatement[]) メソッドオーバーロードを使用して、 CodeCommentStatement 配列のメンバーを CodeCommentStatementCollectionに追加する方法を示します。

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

パラメーター

value
CodeCommentStatementCollection

コレクションに追加するオブジェクトを含む CodeCommentStatementCollection

例外

valuenullです。

次の例では、 AddRange(CodeCommentStatementCollection) メソッドのオーバーロードを使用して、1 つの CodeCommentStatementCollection のメンバーを別のに追加する方法を示します。

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

こちらもご覧ください

適用対象