TraceListenerCollection.ICollection.CopyTo(Array, Int32) Метод
Определение
Копирует раздел текущей коллекции TraceListenerCollection в указанный массив объектов TraceListener.Copies a section of the current TraceListenerCollection to the specified array of TraceListener objects.
virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array array, int index);
abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit
Sub CopyTo (array As Array, index As Integer) Implements ICollection.CopyTo
Параметры
- array
- Array
Одномерный массив объектов TraceListener, в который копируются элементы коллекции TraceListenerCollection.The one-dimensional array of TraceListener objects that is the destination of the elements copied from the TraceListenerCollection. Индекс в массиве должен начинаться с нуля.The array must have zero-based indexing.
- index
- Int32
Отсчитываемый от нуля индекс в массиве array
, указывающий начало копирования.The zero-based index in array
at which copying begins.
Реализации
Комментарии
Используйте CopyTo метод TraceListenerCollection класса, чтобы скопировать всю коллекцию или ее часть в массив.Use the CopyTo method of the TraceListenerCollection class to copy all or part of the collection to an array.