System::Collections::Generic::List::CopyTo‑metod

List::CopyTo(const System::ArrayPtr<T>&) method

Kopierar alla element till befintliga array‑element.

void System::Collections::Generic::List<T>::CopyTo(const System::ArrayPtr<T> &array)
ParameterTypeBeskrivning
arrayconst System::ArrayPtr<T>&Array att kopiera element till.

Se även

List::CopyTo(int, const System::ArrayPtr<T>&, int, int) method

Kopierar element med start från det angivna indexet till befintliga array‑element.

void System::Collections::Generic::List<T>::CopyTo(int index, const System::ArrayPtr<T> &array, int arrayIndex, int count)
ParameterTypeBeskrivning
indexintEtt 0‑baserat index för elementet i listan som representeras av det aktuella objektet att börja kopiera från
arrayconst System::ArrayPtr<T>&Array att kopiera element till.
arrayIndexintStartposition i destinationsarray.
countintAntal element att kopiera.

Se även

List::CopyTo(System::ArrayPtr<T>, int) method

Kopierar listelement till befintliga array‑element.

void System::Collections::Generic::List<T>::CopyTo(System::ArrayPtr<T> array, int arrayIndex) override
ParameterTypeBeskrivning
arraySystem::ArrayPtr<T>Destinationsarray.
arrayIndexintStartindex för destinationsarrayen.

Se även