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

定義

將集合的元素複製至以指定的索引為起始點的指定陣列。Copies the elements of the collection to the specified array, starting at the specified index.

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

參數

destination
Array Array Array

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

index
Int32 Int32 Int32

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

實作

例外狀況

destinationnulldestination is null.

index 小於 0,或大於等於 destination 的長度。index is less than 0 or equal to or greater than the length of destination.

-或--or- DataGridViewComboBoxCell.ObjectCollection 中的項目數大於從 indexdestination 結尾之間的可用空間。The number of elements in the DataGridViewComboBoxCell.ObjectCollection is greater than the available space from index to the end of destination.

destination 是多維的。destination is multidimensional.

備註

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

適用於

另請參閱