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使用 方法,將多個集合中的整數結合成單一陣列。 然後,您可以使用這個陣列,使用 AddRange 方法填入另一個 ListBox 控制項的內容。

適用於