ConcurrentStack<T>.CopyTo(T[], Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從指定的陣列索引開始,將 ConcurrentStack<T> 元素複製到現有的一維 Array。
public:
virtual void CopyTo(cli::array <T> ^ array, int index);
public void CopyTo(T[] array, int index);
abstract member CopyTo : 'T[] * int -> unit
override this.CopyTo : 'T[] * int -> unit
Public Sub CopyTo (array As T(), index As Integer)
參數
- array
- T[]
一維 Array ,即從 中複製 ConcurrentStack<T>元素的目的地。 必須 Array 有零基索引。
- index
- Int32
複製開始的零基索引 array 。
實作
例外狀況
array 是空參考(Visual Basic 中無任何參考)。
index 小於零。
index 等於或大於 -或 的長度 array ,來源中的 ConcurrentStack<T> 元素數大於從 index 到 目的端的 array可用空間。