BlockingCollection<T>.ICollection.CopyTo(Array, Int32) Método
Definição
Copia todos os itens da instância BlockingCollection<T> para uma matriz unidimensional compatível, iniciando no índice especificado da matriz de destino.Copies all of the items in the BlockingCollection<T> instance to a compatible one-dimensional array, starting at the specified index of the target array.
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
Parâmetros
- array
- Array
A matriz unidimensional que é o destino dos elementos copiados da instância BlockingCollection<T>.The one-dimensional array that is the destination of the elements copied from the BlockingCollection<T> instance. A matriz deve ter indexação com base em zero.The array must have zero-based indexing.
- index
- Int32
O índice com base em zero em array no qual a cópia começa.The zero-based index in array at which copying begins.
Implementações
Exceções
O BlockingCollection<T> foi descartado.The BlockingCollection<T> has been disposed.
O argumento array é nulo.The array argument is null.
O argumento index é menor que zero.The index argument is less than zero.
O argumento index é igual ou maior que o comprimento da array, a matriz é multidimensional ou o parâmetro de tipo para a coleção não pode ser convertido automaticamente no tipo da matriz de destino.The index argument is equal to or greater than the length of the array, the array is multidimensional, or the type parameter for the collection cannot be cast automatically to the type of the destination array.