What?s the difference between the System.Array.CopyTo() and
System.Array.Clone()?

Answer Posted / rajesh

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.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain metadata in c#.

578


Expalin the way you implement inheritance by using VB.NET/C#?

619


Can we instantiate abstract class in c#?

556


What is instantiating a class?

595


What is difference between ienumerable and enumerable in c#?

542






What's the difference between a static method and a non static method c#?

599


What is the difference between as and is operators in c#?

519


What are jump statements in c#?

580


What is ac callback?

580


Is hashset ordered c#?

570


What is the difference between “out” and “ref” parameters in c#?

590


Where test director stores its data ? Database ,Local file etc...? I need to read this data from Visual Studio 2005 c# client. Regards

1543


how to stored and retrive video in Sql server using asp.net c#......?

610


What is datareader c#?

577


What are Types of assemblies that can be created in dotnet

657