ListBox.IntegerCollection.CopyTo(Array, Int32) 方法

定義

將整個 ListBox.IntegerCollection 資料複製到陣列中指定位置的現有整數陣列中。

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

參數

destination
Array

複製到的 ListBox.IntegerCollection 陣列。

index
Int32

在目的陣列中複製 ListBox.IntegerCollection. 的位置。

實作

例外狀況

.NET 5 及以後版本: destinationnull

備註

使用這個 CopyTo 方法將多個集合的整數合併成一個陣列。 接著你可以用這個陣列來填入另一個 ListBox 控制項 AddRange 的內容。

適用於