DesignerVerbCollection.AddRange 方法

定义

向集合中添加指定的设计器谓词组。

重载

AddRange(DesignerVerb[])

向集合中添加指定的设计器谓词组。

AddRange(DesignerVerbCollection)

将指定的设计器谓词集合添加到集合中。

AddRange(DesignerVerb[])

Source:
DesignerVerbCollection.cs
Source:
DesignerVerbCollection.cs
Source:
DesignerVerbCollection.cs

向集合中添加指定的设计器谓词组。

public:
 void AddRange(cli::array <System::ComponentModel::Design::DesignerVerb ^> ^ value);
public void AddRange (System.ComponentModel.Design.DesignerVerb[] value);
public void AddRange (System.ComponentModel.Design.DesignerVerb?[] value);
member this.AddRange : System.ComponentModel.Design.DesignerVerb[] -> unit
Public Sub AddRange (value As DesignerVerb())

参数

value
DesignerVerb[]

要添加到集合中的 DesignerVerb 对象的数组。

例外

valuenull

示例

下面的代码示例演示如何将 对象的数组 DesignerVerb 添加到 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 );
// Adds an array of DesignerVerb objects to the collection.
DesignerVerb[] verbs = { new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)), new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) };
collection.AddRange( verbs );

// Adds a collection of DesignerVerb objects to the collection.
DesignerVerbCollection verbsCollection = new DesignerVerbCollection();
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
collection.AddRange( verbsCollection );
' Adds an array of DesignerVerb objects to the collection.
Dim verbs As DesignerVerb() = {New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)), New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))}
collection.AddRange(verbs)

' Adds a collection of DesignerVerb objects to the collection.
Dim verbsCollection As New DesignerVerbCollection()
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
collection.AddRange(verbsCollection)

适用于

AddRange(DesignerVerbCollection)

Source:
DesignerVerbCollection.cs
Source:
DesignerVerbCollection.cs
Source:
DesignerVerbCollection.cs

将指定的设计器谓词集合添加到集合中。

public:
 void AddRange(System::ComponentModel::Design::DesignerVerbCollection ^ value);
public void AddRange (System.ComponentModel.Design.DesignerVerbCollection value);
member this.AddRange : System.ComponentModel.Design.DesignerVerbCollection -> unit
Public Sub AddRange (value As DesignerVerbCollection)

参数

value
DesignerVerbCollection

要添加到集合中的 DesignerVerbCollection

例外

valuenull

示例

下面的代码示例演示如何将 对象的集合 DesignerVerb 添加到 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 );
// Adds an array of DesignerVerb objects to the collection.
DesignerVerb[] verbs = { new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)), new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) };
collection.AddRange( verbs );

// Adds a collection of DesignerVerb objects to the collection.
DesignerVerbCollection verbsCollection = new DesignerVerbCollection();
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
collection.AddRange( verbsCollection );
' Adds an array of DesignerVerb objects to the collection.
Dim verbs As DesignerVerb() = {New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)), New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))}
collection.AddRange(verbs)

' Adds a collection of DesignerVerb objects to the collection.
Dim verbsCollection As New DesignerVerbCollection()
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
collection.AddRange(verbsCollection)

适用于