PartialResultsCollection.CopyTo(Object[], Int32) Método

Definição

O método CopyTo(Object[], Int32) que copia toda a coleção para uma matriz unidimensional, iniciando no índice especificado da matriz de destino.The CopyTo(Object[], Int32) method copies the entire collection to a one-dimensional array, starting at the specified index of the target array.

public:
 void CopyTo(cli::array <System::Object ^> ^ values, int index);
public void CopyTo (object[] values, int index);
member this.CopyTo : obj[] * int -> unit
Public Sub CopyTo (values As Object(), index As Integer)

Parâmetros

values
Object[]

Uma matriz unidimensional que é o destino dos elementos copiados do objeto PartialResultsCollection.A one-dimensional array that is the destination of the elements copied from the PartialResultsCollection object.

index
Int32

O índice de base zero de values em que a cópia é iniciada.The zero-based index of values where copying begins.

Exceções

values é uma referência nula (Nothing no Visual Basic).values is a null reference (Nothing in Visual Basic).

index é menor que zero.index is less than zero.

values é multidimensional.values is multidimensional.

- ou --or- O número de elementos na origem PartialResultsCollection é maior do que o espaço disponível de index até o final do values de destino.The number of elements in the source PartialResultsCollection is greater than the available space from index to the end of the destination values.

O tipo do PartialResultsCollection de origem não pode ser automaticamente convertido para o tipo de values de destino.The type of the source PartialResultsCollection cannot be cast automatically to the type of the destination values.

Aplica-se a