TabletDeviceCollection.CopyTo(TabletDevice[], Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將目前集合中的所有元素複製到指定的一維陣列,從指定的目標陣列索引開始。
public:
void CopyTo(cli::array <System::Windows::Input::TabletDevice ^> ^ array, int index);
public void CopyTo(System.Windows.Input.TabletDevice[] array, int index);
member this.CopyTo : System.Windows.Input.TabletDevice[] * int -> unit
Public Sub CopyTo (array As TabletDevice(), index As Integer)
參數
- array
- TabletDevice[]
一維陣列,作為從集合複製元素的目的地。 陣列必須具有零基索引。
- index
- Int32
陣列參數中以零為基礎的索引,複製開始。
例外狀況
若 index + 集合計數大於或等於 array.length。
若 array 是 null。
若 index 小於 0 或 index 大於等於 array.length。
範例
以下範例示範此 CopyTo 方法。
// Copy the collection to array of tablet devices starting at position index
myTabletDeviceCollection.CopyTo(myTabletDeviceArray, index);
' Copy the collection to array of tablet devices starting at position index
myTabletDeviceCollection.CopyTo(myTabletDeviceArray, index)