CompilerErrorCollection.CopyTo(CompilerError[], Int32) 메서드

정의

컬렉션 값을 지정된 인덱스의 1차원 Array 인스턴스에 복사합니다.

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)

매개 변수

array
CompilerError[]

에서 복사CompilerErrorCollection한 값의 대상인 1차원 Array 입니다.

index
Int32

복사를 시작할 배열의 인덱스입니다.

예외

매개 변수로 array 표시된 배열은 다차원입니다.

-또는-

에 표시된 CompilerErrorCollectionarray배열의 끝 부분과 사이의 index 사용 가능한 공간보다 큰 요소 수입니다.

매개 변수는 array .입니다 null.

index 매개 변수가 매개 변수로 표시된 배열의 하한보다 작습니다array.

예제

다음 예제에서는 지정된 인덱스 값에서 시작하여 메서드를 사용하여 CopyTo 배열에 콘텐츠를 CompilerErrorCollection 복사하는 방법을 보여 줍니다.

// 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)

적용 대상

추가 정보