ToolboxItemCollection 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 ToolboxItemCollection 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| ToolboxItemCollection(ToolboxItem[]) |
使用指定的工具箱項目陣列初始化該類別的新實例 ToolboxItemCollection 。 |
| ToolboxItemCollection(ToolboxItemCollection) |
使用指定的集合,初始化 ToolboxItemCollection 類別的新實例。 |
ToolboxItemCollection(ToolboxItem[])
使用指定的工具箱項目陣列初始化該類別的新實例 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)
使用指定的集合,初始化 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
用來 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)