ReadOnlyDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.CopyTo 메서드

정의

지정한 배열 인덱스부터 사전의 요소를 배열에 복사합니다.

 virtual void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo(cli::array <System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ array, int arrayIndex) = System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>::CopyTo;
void ICollection<KeyValuePair<TKey,TValue>>.CopyTo (System.Collections.Generic.KeyValuePair<TKey,TValue>[] array, int arrayIndex);
abstract member System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo : System.Collections.Generic.KeyValuePair<'Key, 'Value>[] * int -> unit
override this.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo : System.Collections.Generic.KeyValuePair<'Key, 'Value>[] * int -> unit
Sub CopyTo (array As KeyValuePair(Of TKey, TValue)(), arrayIndex As Integer) Implements ICollection(Of KeyValuePair(Of TKey, TValue)).CopyTo

매개 변수

array
KeyValuePair<TKey,TValue>[]

사전에서 복사한 요소의 대상인 1차원 배열입니다. 배열에는 0부터 시작하는 인덱스가 있어야 합니다.

arrayIndex
Int32

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

구현

예외

array이(가) null인 경우

arrayIndex 가 0보다 작습니다.

array가 다차원 배열인 경우

또는 소스 사전의 요소 수가 arrayIndex부터 대상 array 끝까지의 사용 가능한 공간보다 큰 경우

또는 T 형식을 대상 array의 형식으로 자동 캐스팅할 수 없는 경우

적용 대상