DataGridViewComboBoxCell.ObjectCollection.ICollection.CopyTo 方法

定義

將集合的元素複製至以指定的索引為起始點的指定陣列。

 virtual void System.Collections.ICollection.CopyTo(Array ^ destination, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array destination, int index);
abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit
Sub CopyTo (destination As Array, index As Integer) Implements ICollection.CopyTo

參數

destination
Array

從集合複製項目之目的端一維陣列。 陣列必須有以零為起始的索引。

index
Int32

陣列中以零為起始的索引,而且複製會從該位置開始。

實作

例外狀況

destinationnull

index 小於 0,或大於等於 destination 的長度。

-或- DataGridViewComboBoxCell.ObjectCollection 中的項目數大於從 indexdestination 結尾之間的可用空間。

destination 是多維的。

備註

這個成員是明確介面成員實作, 只有在 DataGridViewComboBoxCell.ObjectCollection 執行個體轉換成 ICollection 介面時,才能使用這個成員。

適用於

另請參閱