ToolboxItemCollection.CopyTo(ToolboxItem[], Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將集合複製到指定陣列,起始於指定的目的索引。
public:
void CopyTo(cli::array <System::Drawing::Design::ToolboxItem ^> ^ array, int index);
public void CopyTo(System.Drawing.Design.ToolboxItem[] array, int index);
member this.CopyTo : System.Drawing.Design.ToolboxItem[] * int -> unit
Public Sub CopyTo (array As ToolboxItem(), index As Integer)
參數
- array
- ToolboxItem[]
要複製到的陣列。
- index
- Int32
開始複製的索引。
範例
以下程式碼範例展示了使用 CopyTo 的方法 ToolboxItemCollection。
// Copy the ToolboxItemCollection to the specified array.
array<ToolboxItem^>^items = gcnew array<ToolboxItem^>(collection->Count);
collection->CopyTo( items, 0 );
// Copy the ToolboxItemCollection to the specified array.
ToolboxItem[] items = new ToolboxItem[collection.Count];
collection.CopyTo( items, 0 );
' Copy the ToolboxItemCollection to the specified array.
Dim items(collection.Count) As ToolboxItem
collection.CopyTo(items, 0)