What?s the difference between the System.Array.CopyTo() and
System.Array.Clone()?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / guest
The first one performs a deep copy of the array, the second
one is shallow
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / ranjanatyagi
the first one copy both the data and the structure i.e.
schema of the arry and the second one copy only the
structuere not data.
| Is This Answer Correct ? | 1 Yes | 4 No |
Why is it not a good idea to use empty destructors?
What is the components of window?
what is inheritance and an example in vb.net and c# of when you might use it?
Why abstract class can not be instantiated?
What do u mean by delegation of authority?
Can you inherit multiple interfaces?
What is ienumerable and iqueryable?
Why do we use interface in c#?
What are the differences between events and delegates in c#?
Can property be private in c#?
Why dictionary is used in c#?
Can extension methods access private members?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)