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
Which one is trusted and which one is untrusted?
Is string a primitive data type in c#?
What is helper method in c#?
What is the use of static members with example using c#.net.
Does c# support parameterized properties?
What is difference between continue and break in c#?
What is the difference between protected and internal in c#?
What is class sortedlist underneath?
What is the difference between CreateObject() and GetObject()?
Can we override constructor in c#?
What do u mean by delegation?
Helo , Help Me , Help Me About : C# Windows Application - Network How To Manage IP Client's Accessiblity To The Internet Share concise Substitute , Minor ISA Server
Why do we use readonly in c#?
How many bits is int32?
What is access specifier in c#?