Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CodeCommentStatementCollection::AddRange Method (array<CodeCommentStatement^>^)

 

Copies the elements of the specified CodeCommentStatement array to the end of the collection.

Namespace:   System.CodeDom
Assembly:  System (in System.dll)

public:
void AddRange(
	array<CodeCommentStatement^>^ value
)

Parameters

value
Type: array<System.CodeDom::CodeCommentStatement^>^

An array of type CodeCommentStatement that contains the objects to add to the collection.

Exception Condition
ArgumentNullException

value is null.

The following example demonstrates how to use the AddRange(array<CodeCommentStatement^>^) method overload to add the members of a CodeCommentStatement array to the 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 );

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft