ToolboxItemCollection Constructor (ToolboxItem[])


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

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

public ToolboxItemCollection(
	ToolboxItem[] value


Type: System.Drawing.Design.ToolboxItem[]

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

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

// 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)) } );

.NET Framework
Available since 1.1
Return to top