CompilerErrorCollection.CopyTo(CompilerError[], Int32) Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Copia los valores de la colección en una instancia Array unidimensional en el índice especificado.
public:
void CopyTo(cli::array <System::CodeDom::Compiler::CompilerError ^> ^ array, int index);
public void CopyTo (System.CodeDom.Compiler.CompilerError[] array, int index);
member this.CopyTo : System.CodeDom.Compiler.CompilerError[] * int -> unit
Public Sub CopyTo (array As CompilerError(), index As Integer)
Parámetros
- array
- CompilerError[]
Array unidimensional que constituye el destino de los valores copiados desde CompilerErrorCollection.
- index
- Int32
Índice de la matriz donde se va a comenzar a copiar.
Excepciones
La matriz indicada por el parámetro array es multidimensional.
o bien
El número de elementos de CompilerErrorCollection es mayor que el espacio disponible entre el valor de índice del parámetro arrayIndex en la matriz indicada por el parámetro array y el final de la matriz indicada por el parámetro array.
El parámetro array es null.
El parámetro index es menor que el límite inferior de la matriz indicada por el parámetro array.
Ejemplos
En el ejemplo siguiente se muestra cómo usar el CopyTo método para copiar el contenido de en CompilerErrorCollection una matriz, empezando por el valor de índice especificado.
// Copies the contents of the collection, beginning at index 0,
// to the specified CompilerError array.
// 'errors' is a CompilerError array.
collection->CopyTo( errors, 0 );
// Copies the contents of the collection, beginning at index 0,
// to the specified CompilerError array.
// 'errors' is a CompilerError array.
collection.CopyTo( errors, 0 );
' Copies the contents of the collection, beginning at index 0,
' to the specified CompilerError array.
' 'errors' is a CompilerError array.
collection.CopyTo(errors, 0)