DesignerVerbCollection::AddRange Method (DesignerVerbCollection^)

 

Adds the specified collection of designer verbs to the collection.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

public:
void AddRange(
	DesignerVerbCollection^ value
)

Parameters

value
Type: System.ComponentModel.Design::DesignerVerbCollection^

A DesignerVerbCollection to add to the collection.

Exception Condition
ArgumentNullException

value is null.

The following code example demonstrates how to add a collection of DesignerVerb objects to a DesignerVerbCollection.

// Adds an array of DesignerVerb objects to the collection.
array<DesignerVerb^>^ verbs = {
   gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ),
   gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) )};
collection->AddRange( verbs );

// Adds a collection of DesignerVerb objects to the collection.
DesignerVerbCollection^ verbsCollection = gcnew DesignerVerbCollection;
verbsCollection->Add( gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );
verbsCollection->Add( gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );
collection->AddRange( verbsCollection );

.NET Framework
Available since 1.1
Return to top
Show: