.NET Framework Class Library
Array..::.Copy Method

Copies a range of elements in one Array to another Array and performs type casting and boxing as required.

Overload List

  NameDescription
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(Array, Array, Int32)Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 32-bit integer.
Public methodStatic memberCopy(Array, Array, Int64)Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 64-bit integer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(Array, Int32, Array, Int32, Int32)Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. The length and the indexes are specified as 32-bit integers.
Public methodStatic memberCopy(Array, Int64, Array, Int64, Int64)Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. The length and the indexes are specified as 64-bit integers.
Top
See Also

Reference

Tags :


Community Content

Kristof Verbiest
Dirty trick to cast the array without copying
If you just want to cast the array (from one value type to another) and the array is very large, the overhead of copying all data using Array.Copy might be significant. There is a dirty trick to cast the array without copying. This trick is explained here: http://kristofverbiest.blogspot.com/2008/11/casting-array-of-value-types.html
Tags :

Page view tracker