SortedSet<T>.CopyTo 方法

定義

從目的陣列的開頭或指定的索引處開始,將 SortedSet<T> 的部分或全部項目複製到相容的一維陣列。

多載

CopyTo(T[], Int32, Int32)

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

CopyTo(T[], Int32)

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

CopyTo(T[])

從目標陣列的開頭開始,將完整的 SortedSet<T> 複製到相容的一維陣列。

備註

這個方法是作業 O(n) ,其中 nCount

CopyTo(T[], Int32, Int32)

來源:
SortedSet.cs
來源:
SortedSet.cs
來源:
SortedSet.cs

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

public:
 void CopyTo(cli::array <T> ^ array, int index, int count);
public void CopyTo (T[] array, int index, int count);
member this.CopyTo : 'T[] * int * int -> unit
Public Sub CopyTo (array As T(), index As Integer, count As Integer)

參數

array
T[]

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

index
Int32

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

count
Int32

要複製的項目數目。

例外狀況

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

arraynull

index 小於零。

-或-

count 小於零。

備註

這個方法是作業 O(n) ,其中 ncount

適用於

CopyTo(T[], Int32)

來源:
SortedSet.cs
來源:
SortedSet.cs
來源:
SortedSet.cs

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

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[]

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

index
Int32

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

實作

例外狀況

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

arraynull

index 小於零。

備註

這個方法是作業 O(n) ,其中 nCount

適用於

CopyTo(T[])

來源:
SortedSet.cs
來源:
SortedSet.cs
來源:
SortedSet.cs

從目標陣列的開頭開始,將完整的 SortedSet<T> 複製到相容的一維陣列。

public:
 void CopyTo(cli::array <T> ^ array);
public void CopyTo (T[] array);
member this.CopyTo : 'T[] -> unit
Public Sub CopyTo (array As T())

參數

array
T[]

一維陣列,表示從這個 SortedSet<T> 複製過來之項目的目的地。

例外狀況

來源 SortedSet<T> 中的元素數目大於目的陣列可包含的元素數目。

arraynull

備註

array 索引必須是以零起始的。

適用於