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
Is xml tags are case sensitive?
i want o/p 011242110 in c# code.
How can I produce an assembly?
What is datareader c#?
What is strongly typed view?
How do I create multifile assembly?
if a method is marked as protected internal who can access it?
List the difference between the virtual method and the abstract method?
What is action in c# 3.5?
What is boolean method?
Is null empty or whitespace c#?
Can int be null c#?
Can struct have constructor c#?
What is system console writeline in c#?
What is hashtable in c# with example?