DataGridViewSelectedCellCollection.CopyTo(DataGridViewCell[], Int32) 메서드

정의

지정한 인덱스로부터 컬렉션의 요소를 지정한 DataGridViewCell 배열에 복사합니다.

public:
 void CopyTo(cli::array <System::Windows::Forms::DataGridViewCell ^> ^ array, int index);
public void CopyTo (System.Windows.Forms.DataGridViewCell[] array, int index);
override this.CopyTo : System.Windows.Forms.DataGridViewCell[] * int -> unit
Public Sub CopyTo (array As DataGridViewCell(), index As Integer)

매개 변수

array
DataGridViewCell[]

컬렉션에서 복사된 요소의 대상인 DataGridViewCell 형식의 일차원 배열입니다. 배열에는 0부터 시작하는 인덱스가 있어야 합니다.

index
Int32

array에서 복사가 시작되는 0부터 시작하는 인덱스입니다.

예외

array이(가) null인 경우

index가 0보다 작은 경우

array가 다차원 배열인 경우

또는 DataGridViewCellCollection의 요소 수가 index부터 array 끝까지의 사용 가능한 공간보다 큽니다.

DataGridViewCellCollectionarray 형식으로 자동 캐스팅되지 않는 경우

적용 대상

추가 정보