NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ICollection.CopyTo

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
);

Parameters

array
The Array to receive the ICollection 's elements.
index
The array index at which to start copying.

Return Value

None.

Exceptions

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.

See Also

ICollection Interface | ICollection Members | System.Collections Namespace