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

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)

适用于