Sanjeev Singh
What is difference between the System.Array.CopyTo() and System.Array.Clone() ?
By Sanjeev Singh in ASP.NET on Jan 29 2009
  • Gohil Jayendrasinh
    Feb, 2009 10

    clone() create a new object for existing array it's key and value par are same as old array, while in copy it's different it's depands up on has table

    • 0
  • kelly gammons
    Feb, 2009 2

    The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array.  The CopyTo() method copies the elements into another existing array.  Both perform a shallow copy.  A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array.  A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS