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 );
None.
Exception Type | Condition |
---|---|
ArgumentNullException | array is a null reference (in Visual Basic Nothing). |
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.
Array Class | Array Members | System Namespace | ICollection | Copy