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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應