CompilerErrorCollection.CopyTo(CompilerError[], Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies the collection values to a one-dimensional Array instance at the specified index.
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)
Parameters
- array
- CompilerError[]
The one-dimensional Array that is the destination of the values copied from CompilerErrorCollection.
- index
- Int32
The index in the array at which to start copying.
Exceptions
The array indicated by the array
parameter is multidimensional.
-or-
The number of elements in the CompilerErrorCollection is greater than the available space between the index value of the arrayIndex
parameter in the array indicated by the array
parameter and the end of the array indicated by the array
parameter.
The array
parameter is null
.
The index
parameter is less than the lowbound of the array indicated by the array
parameter.
Examples
The following example demonstrates how to use the CopyTo method to copy the contents of a CompilerErrorCollection to an array, starting at the specified index value.
// 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)
Applies to
See also
.NET