語言

ItemCollection.CopyTo(Array, Int32) 方法

定義

將集合的元素複製到陣列,從特定的陣列索引開始。

public:
 virtual void CopyTo(Array ^ array, int index);
public void CopyTo(Array array, int index);
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
Public Sub CopyTo (array As Array, index As Integer)

參數

array
Array

要複製到的目標陣列。

index
Int32

目的陣列中以零為基礎的索引。

實作

例外狀況

參數 array 為 null。

目的地 array 是多面向的。

參數 index 小於 0。

適用於