ListBox.IntegerCollection.CopyTo(Array, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將整個 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 及以後版本: destination 是 null。
備註
使用這個 CopyTo 方法將多個集合的整數合併成一個陣列。 接著你可以用這個陣列來填入另一個 ListBox 控制項 AddRange 的內容。