Home | Submit an interview question | Filter by category | Filter by job function | Filter by company
 
Member Information
User Id
Password
 
Forgot Password
Technology Category
.NET (1202)
Languages (103)
Database (146)
Operating System (48)
Reporting (5)
Third-Party Tools (2)
Testing (91)
OOP (75)
Web Development (40)
Design Patterns (89)
General (9)
Networking (88)
Hardware (63)
Brain Exercise (2)
Others (37)
 Our Network
.NET Heaven
C# Corner
Interview Corner
Longhorn Corner
Mindcracker
VB.NET Heaven
Home » Languages » Languages
What’s the difference between the System.Array.CopyTo() and System.Array.Clone() ?
Posted by Sapna Malik Oct 09, 2009
Viewed : 1371 times
Major Category : Languages
Minor Category : C-Sharp
Total Replies : 3
Become a Sponsor
 EDITORIAL ANSWER  
No Reply Yet
 ANSWERS BY USERS  
Asheej TK
Nov 10, 2009

Still need more detailed info refer below link

http://www.csharpfriends.com/Forums/ShowPost.aspx?PostID=28509

SAURABH KUMAR
Nov 10, 2009
System.Array.CopyTo copies all the contents of the existing array while System.Array.Clone creates a shallow model similar to the existing array.
Pradeep
Oct 16, 2009

The System.Arry.Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The System.Arry.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. 

  
1

 

 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Advertise with us
Current Version: 2.2009.3.2
 © 1999 - 2009  Mindcracker LLC. All Rights Reserved