WHAT’S THE DIFFERENCE BETWEEN THE SYSTEM.ARRAY.COPYTO() AND SYSTEM.ARRAY.CLONE() ?

Anchal Kesharwani

Total Post:15

Points:75
Posted by  Anchal Kesharwani
.NET  C# 
C#
 841  View(s)
Ratings:
Rate this:
  1. Anchal Kesharwani

    Post:15

    Points:75
    What’s the difference between the System.Array.CopyTo() and System.Array.Clone() ?

    Using Clone() method, we creates a new array object containing all the elements in the original array and using CopyTo() method, all the elements of existing array copies into another existing array. Both the methods perform a shallow copy.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!