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!

Array.CopyTo

Copies all the elements of the current Array into the specified Array, starting at the specified destination Array index.

[Visual Basic]
Overridable Public Sub CopyTo( _
   ByVal array As Array, _
   ByVal index As Integer _
)
[C#]
public virtual void CopyTo(
   Array array,
   int index
);
[C++]
public: virtual void CopyTo(
   Array* array,
   int index
);
[JScript]
public function CopyTo(
   array : Array,
   index : int
);

Parameters

array
The destination Array to copy the current Array 's elements into.
index
The destination Array index to start copying into.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (in Visual Basic Nothing).

Remarks

This method can be overridden by a derived class.

This method is provided to support the ICollection interface and calls Copy internally. If implementing ICollection is not explicitly required, use Copy to avoid an extra indirection.

See Also

Array Class | Array Members | System Namespace | ICollection | Copy