ICollection.CopyTo(Array, Int32) Methode
Definition
Kopiert die Elemente der ICollection in ein Array, beginnend bei einem bestimmten Array-Index.Copies the elements of the ICollection to an Array, starting at a particular Array index.
public:
void CopyTo(Array ^ array, int index);
public void CopyTo (Array array, int index);
abstract member CopyTo : Array * int -> unit
Public Sub CopyTo (array As Array, index As Integer)
Parameter
- array
- Array
Das eindimensionale Array, das das Ziel der aus der ICollection kopierten Elemente ist.The one-dimensional Array that is the destination of the elements copied from ICollection. Für das Array muss eine nullbasierte Indizierung verwendet werden.The Array must have zero-based indexing.
- index
- Int32
Der nullbasierte Index im array
, bei dem der Kopiervorgang beginnt.The zero-based index in array
at which copying begins.
Ausnahmen
array
ist null
.array
is null
.
index
ist kleiner als Null.index
is less than zero.
array
ist mehrdimensional.array
is multidimensional.
- oder --or-
Die Anzahl der Elemente in der Quell-ICollection ist größer als der verfügbare Platz vom index
bis zum Ende des Ziel-array
s.The number of elements in the source ICollection is greater than the available space from index
to the end of the destination array
.
- oder --or-
Der Typ der Quell-ICollection kann nicht automatisch in den Typ des Ziel-array
umgewandelt werden.The type of the source ICollection cannot be cast automatically to the type of the destination array
.