DataGridViewComboBoxCell.ObjectCollection.CopyTo(Object[], Int32) DataGridViewComboBoxCell.ObjectCollection.CopyTo(Object[], Int32) DataGridViewComboBoxCell.ObjectCollection.CopyTo(Object[], Int32) DataGridViewComboBoxCell.ObjectCollection.CopyTo(Object[], Int32) Method

定義

將整個集合複製到陣列中,指定位置的現有物件陣列中。Copies the entire collection into an existing array of objects at a specified location within the array.

public:
 void CopyTo(cli::array <System::Object ^> ^ destination, int arrayIndex);
public void CopyTo (object[] destination, int arrayIndex);
member this.CopyTo : obj[] * int -> unit
Public Sub CopyTo (destination As Object(), arrayIndex As Integer)

參數

destination
Object[]

要將內容複製到其中的目標陣列。The destination array to which the contents will be copied.

arrayIndex
Int32 Int32 Int32 Int32

destination 中元素的索引,要在這裡開始複製。The index of the element in destination at which to start copying.

例外狀況

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

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

destination 是多維的。destination is multidimensional.

適用於

另請參閱