DesignerVerbCollection::AddRange Method (array<DesignerVerb^>^)
.NET Framework (current version)
Adds the specified set of designer verbs to the collection.
Assembly: System (in System.dll)
Parameters
- value
-
Type:
array<System.ComponentModel.Design::DesignerVerb^>^
An array of DesignerVerb objects to add to the collection.
| Exception | Condition |
|---|---|
| ArgumentNullException | value is null. |
The following code example demonstrates how to add an array 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
Available since 1.1
Show: