GridColumnStylesCollection.ICollection.CopyTo(Array, Int32) GridColumnStylesCollection.ICollection.CopyTo(Array, Int32) Method

定义

从目标数组的指定索引处开始,将集合复制到兼容的一维 ArrayCopies the collection to a compatible one-dimensional Array, starting at the specified index of the target array.

 virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array array, int index);

参数

array
Array Array

一维 Array,用作从集合复制的元素的目标数组。The one-dimensional Array that is the destination of the elements copied from collection. 该数组的索引必须从零开始。The array must have zero-based indexing.

index
Int32 Int32

数组中开始复制的位置的索引(从零开始)。The zero-based index in the array at which copying begins.

实现

异常

arraynullarray is null.

index 小于零。index is less than zero.

array 是多维的。array is multidimensional.

-or- GridColumnStylesCollection 中的元素个数大于 indexarray 末尾之间的可用空间。The number of elements in the GridColumnStylesCollection is greater than the available space from index to the end of array.

GridColumnStylesCollection 类型不能自动强制转换为 array 类型。The type of the GridColumnStylesCollection cannot be cast automatically to the type of array.

适用于