What’s the difference between the System.Array.CopyTo() and Clone() function?
What's the difference between the System.Array.CopyTo() andClone() functions?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manikavelu VelayuthamPosted Mar 17, 2011, 5:12 AM
Clone() method makes a clone of the original array. It returns an exact length array.
CopyTo() copies the elements from the original array to the destination array starting at the specified destination array index. Note that, this adds elements to an already existing array.
VulpesPosted Mar 17, 2011, 5:11 AM
Array.CopyTo() copies the elements of one array, starting from a specified index, to another array which you've already created. Only single dimensional arrays can be copied with this method.