When implemented by a class, copies the elements of the ICollection into an Array, starting at a particular Array index.
[Visual Basic] Sub CopyTo( _ ByVal array As Array, _ ByVal index As Integer _ ) [C#] void CopyTo( Array array, int index ); [C++] void CopyTo( Array* array, int index ) = 0; [JScript] function CopyTo( array : Array, index : int );
None.
Exception Type | Condition |
---|---|
ArgumentException | The sum of index and the number of elements in the ICollection is greater than the length of array. |
ArgumentNullException | array is a null reference object. |
ArgumentOutOfRangeException | index is not a valid index in array. |
ICollection Interface | ICollection Members | System.Collections Namespace