语言

ToolboxItemCollection 构造函数

定义

初始化 ToolboxItemCollection 类的新实例。

重载

名称 说明
ToolboxItemCollection(ToolboxItem[])

使用指定的工具箱项数组初始化类的新实例 ToolboxItemCollection 。

ToolboxItemCollection(ToolboxItemCollection)

使用指定的集合初始化类的新实例 ToolboxItemCollection 。

ToolboxItemCollection(ToolboxItem[])

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

使用指定的工具箱项数组初始化类的新实例 ToolboxItemCollection 。

public:
 ToolboxItemCollection(cli::array <System::Drawing::Design::ToolboxItem ^> ^ value);
public ToolboxItemCollection(System.Drawing.Design.ToolboxItem[] value);
new System.Drawing.Design.ToolboxItemCollection : System.Drawing.Design.ToolboxItem[] -> System.Drawing.Design.ToolboxItemCollection
Public Sub New (value As ToolboxItem())

参数

value
ToolboxItem[]

包含要填充集合的工具箱项的类型 ToolboxItem 数组。

示例

下面的代码示例演示如何使用对象数组ToolboxItemCollection初始化的新ToolboxItem实例。

// Create a new ToolboxItemCollection using a ToolboxItem array.
array<ToolboxItem^>^temp0 = {gcnew ToolboxItem( System::Windows::Forms::Label::typeid ),gcnew ToolboxItem( System::Windows::Forms::TextBox::typeid )};
ToolboxItemCollection^ collection = gcnew ToolboxItemCollection( temp0 );
// 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)) } );
' Create a new ToolboxItemCollection using a ToolboxItem array.
Dim collection As New ToolboxItemCollection(New ToolboxItem() _
 {New ToolboxItem(GetType(System.Windows.Forms.Label)), _
  New ToolboxItem(GetType(System.Windows.Forms.TextBox))})

适用于

ToolboxItemCollection(ToolboxItemCollection)

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

使用指定的集合初始化类的新实例 ToolboxItemCollection 。

public:
 ToolboxItemCollection(System::Drawing::Design::ToolboxItemCollection ^ value);
public ToolboxItemCollection(System.Drawing.Design.ToolboxItemCollection value);
new System.Drawing.Design.ToolboxItemCollection : System.Drawing.Design.ToolboxItemCollection -> System.Drawing.Design.ToolboxItemCollection
Public Sub New (value As ToolboxItemCollection)

参数

value
ToolboxItemCollection

要填充新集合的 A ToolboxItemCollection 。

示例

下面的代码示例演示如何创建使用另一个ToolboxItemCollection初始化的新ToolboxItemCollection实例。

// Create a new ToolboxItemCollection using an existing ToolboxItemCollection.
ToolboxItemCollection^ coll = gcnew ToolboxItemCollection( collection );
// Create a new ToolboxItemCollection using an existing ToolboxItemCollection.
ToolboxItemCollection coll =
    new ToolboxItemCollection( collection );
' Creates a new ToolboxItemCollection using an existing ToolboxItemCollection.
Dim coll As New ToolboxItemCollection(collection)

适用于