ConcurrentDictionary<TKey,TValue>.ICollection.CopyTo Metod

Definition

Kopierar elementen i ICollection till en matris med början vid det angivna matrisindexet.

 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

Parametrar

array
Array

Den endimensionella matris som är målet för de element som kopieras från ICollection. Matrisen måste ha nollbaserad indexering.

index
Int32

Det nollbaserade index array där kopieringen börjar.

Implementeringar

Undantag

array är null.

index är mindre än 0.

index är lika med eller större än längden på array.

-eller-

Antalet element i källan ICollection är större än det tillgängliga utrymmet från index till slutet av målet array.

Gäller för

Se även