DoubleCollection.CopyTo(Double[], Int32) 方法

定義

將這個 DoubleCollection 的項目複製到 Double 值陣列中,從指定的索引開始。Copies the items of this DoubleCollection, starting with the specified index, into an array of Double values.

public:
 virtual void CopyTo(cli::array <double> ^ array, int index);
public void CopyTo (double[] array, int index);
abstract member CopyTo : double[] * int -> unit
override this.CopyTo : double[] * int -> unit
Public Sub CopyTo (array As Double(), index As Integer)

參數

array
Double[]

陣列,是從這個 DoubleCollection 複製項目之目的端。The array that is the destination of the items copied from this DoubleCollection.

index
Int32

要開始複製的索引。The index at which to begin copying.

例外狀況

arraynullarray is null.

index 小於零。index is less than zero.

array 是多維的。array is multidimensional.

-或--or- 來源 DoubleCollection 中的項目數大於從 index 到目的 array 結尾的可用空間。The number of items in the source DoubleCollection is greater than the available space from index to the end of the destination array.

適用於