SortedSet<T>.ICollection.CopyTo(Array, Int32) 方法

定義

從指定的陣列索引處開始,將完整的 SortedSet<T> 複製到相容的一維陣列中。

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

參數

array
Array

一維陣列,表示從這個 SortedSet<T> 複製過來之項目的目的地。 陣列必須有以零為起始的索引。

index
Int32

array 中以零起始的索引,即開始複製的位置。

實作

例外狀況

來源陣列中的元素數目大於從 index 至目的陣列結尾間的可用空間。

arraynull

index 小於零。

備註

這個成員是明確介面成員實作, 只有在 SortedSet<T> 執行個體轉換成 ICollection 介面時,才能使用這個成員。

適用於