ToolboxItemCollection Constructors

Definition

Initializes a new instance of the ToolboxItemCollection class.

Overloads

ToolboxItemCollection(ToolboxItem[])

Initializes a new instance of the ToolboxItemCollection class using the specified array of toolbox items.

ToolboxItemCollection(ToolboxItemCollection)

Initializes a new instance of the ToolboxItemCollection class using the specified collection.

ToolboxItemCollection(ToolboxItem[])

Source:
ToolboxItemCollection.cs
Source:
ToolboxItemCollection.cs
Source:
ToolboxItemCollection.cs

Initializes a new instance of the ToolboxItemCollection class using the specified array of toolbox items.

C#
public ToolboxItemCollection(System.Drawing.Design.ToolboxItem[] value);

Parameters

value
ToolboxItem[]

An array of type ToolboxItem containing the toolbox items to fill the collection with.

Examples

The following code example demonstrates creating a new ToolboxItemCollection instance initialized using an array of ToolboxItem objects.

C#
// Create a new ToolboxItemCollection using a ToolboxItem array.
ToolboxItemCollection collection = 
    new ToolboxItemCollection( new ToolboxItem[] { 
        new ToolboxItem(typeof(System.Windows.Forms.Label)),
        new ToolboxItem(typeof(System.Windows.Forms.TextBox)) } );

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ToolboxItemCollection(ToolboxItemCollection)

Source:
ToolboxItemCollection.cs
Source:
ToolboxItemCollection.cs
Source:
ToolboxItemCollection.cs

Initializes a new instance of the ToolboxItemCollection class using the specified collection.

C#
public ToolboxItemCollection(System.Drawing.Design.ToolboxItemCollection value);

Parameters

value
ToolboxItemCollection

A ToolboxItemCollection to fill the new collection with.

Examples

The following code example demonstrates creating a new ToolboxItemCollection instance initialized using another ToolboxItemCollection.

C#
// Create a new ToolboxItemCollection using an existing ToolboxItemCollection.
ToolboxItemCollection coll =
    new ToolboxItemCollection( collection );

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10