TabletDeviceCollection.CopyTo(TabletDevice[], Int32) 方法

定義

從指定之目的陣列索引開始,將目前集合之所有項目複製到指定的一維陣列。

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

如果 arraynull

如果 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)

適用於