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.Copy (Array, Array, Int32)

Copies a range of elements from a one-dimensional Array starting at the lower bound index, and pastes them into another one-dimensional Array starting at the lower bound index.

[Visual Basic]
Overloads Public Shared Sub Copy( _
   ByVal sourceArray As Array, _
   ByVal destinationArray As Array, _
   ByVal length As Integer _
)
[C#]
public static void Copy(
   Array sourceArray,
   Array destinationArray,
   int length
);
[C++]
public: static void Copy(
   Array* sourceArray,
   Array* destinationArray,
   int length
);
[JScript]
public static function Copy(
   sourceArray : Array,
   destinationArray : Array,
   length : int
);

Parameters

sourceArray
The one-dimensional Array containing the data to copy.
destinationArray
The one-dimensional Array to receive the data.
length
The number of elements to copy.

Return Value

None.

Exceptions

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

-or-

destinationArray is a null reference (Nothing).

RankException sourceArray is multidimensional.

-or-

destinationArray is multidimensional.

ArrayTypeMismatchException sourceArray and destinationArray are of incompatible types.
InvalidCastException At least one element in sourceArray could not be cast to destinationArray 's type.
ArgumentOutOfRangeException length is less than 0.

-or-

length is greater than the number of elements in sourceArray.

-or-

length is greater than the number of elements in destinationArray.

Remarks

Both the source array and the destination array must be one-dimensional. The source array can have zero elements.

The arrays may be reference-type arrays or value-type arrays. Type-downcasting is performed, as required.

See Also

Array Class | Array Members | System Namespace | Array.Copy Overload List