Export (0) Print
Expand All

ICollection.CopyTo Method

IIS 7.0

Copies the elements of the collection to an array, starting at a particular array index.

Namespace:  Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

void ICollection.CopyTo(
	Array array,
	int index
)

Parameters

array
Type: System..::..Array
The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.
index
Type: System..::..Int32
The zero-based index in array at which copying starts.

Implements

ICollection..::..CopyTo(Array, Int32)

ExceptionCondition
[ArgumentNullException]

array is nullNothingnullptrunita null reference (Nothing in Visual Basic).

[ArgumentOutOfRangeException]

index is less than 0.

[ArgumentException]

array is multidimensional.

-or-

array does not have zero-based indexing.

-or-

index is equal to or greater than the length of array.

-or-

The number of elements in the source System.Collections..::..ICollection object is greater than the available space from index to the end of the destination array.

The specified array must be of a type that inherits from the ConfigurationElement class.

This method uses the List<(Of <(<'T>)>)>..::..CopyTo method to copy the elements.

Community Additions

ADD
Show:
© 2014 Microsoft