I want to use a shallow copy of my array but i am confuse between System.Array.CopyTo() and System.Array.Clone().
So, Please give me a solution.
Thank you.
Home / DeveloperSection / Forums / difference between System.Array.CopyTo() and System.Array.Clone()
Anupam Mishra
01-Feb-2016Both CopyTo() and Clone() make shallow copy. Clone() method makes a clone of the original array. It returns an exact length array.
On the other hand, 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.