CheckedListBox.CheckedItemCollection.CopyTo 方法

将整个集合复制到现有数组中,从该数组内的指定位置开始复制。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public Sub CopyTo ( _
    dest As Array, _
    index As Integer _
)
用法
Dim instance As CheckedItemCollection
Dim dest As Array
Dim index As Integer

instance.CopyTo(dest, index)
public void CopyTo (
    Array dest,
    int index
)
public:
virtual void CopyTo (
    Array^ dest, 
    int index
) sealed
public final void CopyTo (
    Array dest, 
    int index
)
public final function CopyTo (
    dest : Array, 
    index : int
)

参数

  • dest
    目标数组。
  • index
    dest 中的从零开始的相对索引,复制即从该位置开始。

异常

异常类型 条件

ArgumentNullException

array 为 空引用(在 Visual Basic 中为 Nothing)。

RankException

array 是多维的。

ArgumentOutOfRangeException

index 小于零。

ArgumentException

index 等于或大于数组的长度。

- 或 -

Array 中元素的数目大于从索引到目标 Array 结尾的可用空间。

ArrayTypeMismatchException

Array 的类型无法自动转换为目标 Array 的类型。

备注

可以使用此方法将选定的索引从多个集合组合到单个数组中。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

CheckedListBox.CheckedItemCollection 类
CheckedListBox.CheckedItemCollection 成员
System.Windows.Forms 命名空间