ReadOnlyDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.CopyTo Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Copia os elementos do dicionário para um array, começando no índice especificado do array.
virtual void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo(cli::array <System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ array, int arrayIndex) = System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>::CopyTo;
void ICollection<KeyValuePair<TKey,TValue>>.CopyTo(System.Collections.Generic.KeyValuePair<TKey,TValue>[] array, int arrayIndex);
abstract member System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo : System.Collections.Generic.KeyValuePair<'Key, 'Value>[] * int -> unit
override this.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo : System.Collections.Generic.KeyValuePair<'Key, 'Value>[] * int -> unit
Sub CopyTo (array As KeyValuePair(Of TKey, TValue)(), arrayIndex As Integer) Implements ICollection(Of KeyValuePair(Of TKey, TValue)).CopyTo
Parâmetros
- array
- KeyValuePair<TKey,TValue>[]
O array unidimensional que é o destino dos elementos copiados do dicionário. O array deve ter indexação baseada em zero.
- arrayIndex
- Int32
O índice baseado em zero em array onde começa a cópia.
Implementações
Exceções
array é null.
arrayIndex é inferior a 0.
array é multidimensional.
-ou-
O número de elementos no dicionário-fonte é maior do que o espaço disponível de arrayIndex até ao fim do destino array.
-ou-
O tipo T não pode ser confundido automaticamente para o tipo do destino array.