ListBox.ObjectCollection.ICollection.CopyTo(Array, Int32) ListBox.ObjectCollection.ICollection.CopyTo(Array, Int32) ListBox.ObjectCollection.ICollection.CopyTo(Array, Int32) Method

定義

從特定的陣列索引開始,將集合的項目複製到陣列。Copies the elements of the collection to an array, starting at a particular array index.

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

 virtual void System.Collections.ICollection.CopyTo(Array ^ dest, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array dest, int index);
Sub CopyTo (dest As Array, index As Integer) Implements ICollection.CopyTo

參數

destination
Array Array Array

一維陣列,是從 ICollection 複製過來之項目的目的端。The one-dimensional array that is the destination of the elements copied from ICollection. 陣列必須有以零為起始的索引。The array must have zero-based indexing.

index
Int32 Int32 Int32

陣列中以零為起始的索引,而且複製會從該位置開始。The zero-based index in the array at which copying begins.

實作

例外狀況

此陣列型別與 ListBox.ObjectCollection 中的項目不相容。The array type is not compatible with the items in the ListBox.ObjectCollection.

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 ListBox.ObjectCollection 執行個體轉換成 ICollection 介面時,才能使用這個成員。It can be used only when the ListBox.ObjectCollection instance is cast to an ICollection interface.

適用於