ICollection.CopyTo(Array, Int32) 메서드
정의
특정 ICollection 인덱스부터 시작하여 Array의 요소를 Array에 복사합니다.Copies the elements of the ICollection to an Array, starting at a particular Array index.
public:
void CopyTo(Array ^ array, int index);
public void CopyTo (Array array, int index);
abstract member CopyTo : Array * int -> unit
Public Sub CopyTo (array As Array, index As Integer)
매개 변수
- array
- Array
Array에서 복사한 요소의 대상인 일차원 ICollection입니다.The one-dimensional Array that is the destination of the elements copied from ICollection. Array에는 0부터 시작하는 인덱스가 있어야 합니다.The Array must have zero-based indexing.
- index
- Int32
array
에서 복사가 시작되는 0부터 시작하는 인덱스입니다.The zero-based index in array
at which copying begins.
예외
array
이(가) null
인 경우array
is null
.
index
가 0보다 작은 경우index
is less than zero.
array
가 다차원 배열인 경우array
is multidimensional.
또는-or-
소스 ICollection의 요소 수가 대상 array
의 index
부터 끝까지 사용 가능한 공간보다 큽니다.The number of elements in the source ICollection is greater than the available space from index
to the end of the destination array
.
또는-or-
소스 ICollection의 형식을 대상 array
의 형식으로 자동 캐스팅할 수 없습니다.The type of the source ICollection cannot be cast automatically to the type of the destination array
.