CodeAttributeArgumentCollection.CopyTo(CodeAttributeArgument[], Int32) Метод

Определение

Копирует объекты коллекции в одномерный Array экземпляр, начинающийся с указанного индекса.

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

Параметры

array
CodeAttributeArgument[]

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

index
Int32

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

Исключения

Массив назначения является многомерным.

–или–

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

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

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

Примеры

В следующем примере показано, как скопировать содержимое CodeAttributeArgumentCollection объекта CodeAttributeArgument в массив, начиная с указанного значения индекса.

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

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