DataGridViewSelectedRowCollection.ICollection.CopyTo(Array, Int32) Метод
Определение
Копирует элементы коллекции в заданный массив, начиная с указанного индекса.Copies the elements of the collection to the specified array, starting at the specified index.
virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array array, int index);
abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit
Sub CopyTo (array As Array, index As Integer) Implements ICollection.CopyTo
Параметры
- array
- Array
Одномерный массив, куда копируются элементы из данной коллекции.The one-dimensional array that is the destination of the elements copied from the collection. Индекс в массиве должен начинаться с нуля.The array must have zero-based indexing.
- index
- Int32
Индекс (отсчет с нуля) в массиве, с которого начинается копирование.The zero-based index in the array at which copying begins.
Реализации
Исключения
array
имеет значение null
.array
is null
.
Значение параметра index
меньше нуля.index
is less than zero.
Массив array
является многомерным.array
is multidimensional.
-или--or-
Количество элементов в массиве DataGridViewCellCollection больше, чем может поместиться в свободном пространстве между индексом index
и концом массива array
.The number of elements in the DataGridViewCellCollection is greater than the available space from index
to the end of array
.
Коллекцию DataGridViewCellCollection невозможно автоматически привести к типу array
.The DataGridViewCellCollection cannot be cast automatically to the type of array
.
Комментарии
Этот член представляет собой явную реализацию члена интерфейса.This member is an explicit interface member implementation. Он может использоваться, только если экземпляр DataGridViewSelectedRowCollection приведен к типу интерфейса ICollection.It can be used only when the DataGridViewSelectedRowCollection instance is cast to an ICollection interface.