ListBox.ObjectCollection.ICollection.CopyTo(Array, Int32) Metoda

Definice

Zkopíruje prvky kolekce do pole počínaje konkrétním indexem pole.

Toto rozhraní API podporuje produktovou infrastrukturu a není určené k použití přímo z uživatelského kódu.

 virtual void System.Collections.ICollection.CopyTo(Array ^ dest, int index) = System::Collections::ICollection::CopyTo;
 virtual void System.Collections.ICollection.CopyTo(Array ^ destination, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array dest, int index);
void ICollection.CopyTo (Array destination, int index);
abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit
abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit
Sub CopyTo (dest As Array, index As Integer) Implements ICollection.CopyTo
Sub CopyTo (destination As Array, index As Integer) Implements ICollection.CopyTo

Parametry

destdestination
Array

Jednorozměrné pole, které je cílem prvků zkopírovaných z ICollection. Pole musí mít indexování s nulovým základem.

index
Int32

Index založený na nule v poli, na kterém začíná kopírování.

Implementuje

Výjimky

Typ pole není kompatibilní s položkami v poli ListBox.ObjectCollection.

.NET 5 a novější: destination je null.

Poznámky

Tento člen je explicitní implementace členu rozhraní. Lze ho ListBox.ObjectCollection použít pouze v případě, že je instance přetypována do ICollection rozhraní.

Platí pro