CodeCommentStatementCollection.AddRange メソッド

定義

指定した CodeCommentStatement 配列の要素をコレクションの末尾にコピーします。

オーバーロード

AddRange(CodeCommentStatement[])

指定した CodeCommentStatement 配列の要素をコレクションの末尾にコピーします。

AddRange(CodeCommentStatementCollection)

別の CodeCommentStatementCollection オブジェクトの内容をコレクションの末尾にコピーします。

AddRange(CodeCommentStatement[])

ソース:
CodeCommentStatementCollection.cs
ソース:
CodeCommentStatementCollection.cs
ソース:
CodeCommentStatementCollection.cs

指定した 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.
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.cs
ソース:
CodeCommentStatementCollection.cs
ソース:
CodeCommentStatementCollection.cs

別の 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.
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)

こちらもご覧ください

適用対象