CodeTypeReferenceCollection.CopyTo(CodeTypeReference[], Int32) Метод

Определение

Копирует элементы в коллекцию в указанный одномерный Array индекс.

public:
 void CopyTo(cli::array <System::CodeDom::CodeTypeReference ^> ^ array, int index);
public void CopyTo(System.CodeDom.CodeTypeReference[] array, int index);
member this.CopyTo : System.CodeDom.CodeTypeReference[] * int -> unit
Public Sub CopyTo (array As CodeTypeReference(), index As Integer)

Параметры

array
CodeTypeReference[]

Одномерный Array объект, который является назначением значений, скопированных из коллекции.

index
Int32

Индекс массива, с которого начинается вставка.

Исключения

Параметр array является многомерным.

–или–

Число элементов в CodeTypeReferenceCollection массиве больше, чем доступное пространство между индексом целевого массива, заданным index параметром, и концом целевого массива.

Параметр array имеет значение null.

Параметр index меньше минимального индекса целевого массива.

Примеры

// Copies the contents of the collection, beginning at index 0,
// to the specified CodeTypeReference array.
// 'references' is a CodeTypeReference array.
collection.CopyTo( references, 0 );
' Copies the contents of the collection, beginning at index 0, 
' to the specified CodeTypeReference array.
' 'references' is a CodeTypeReference array.
collection.CopyTo(references, 0)

Применяется к

См. также раздел