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

Answer Posted / jiturcm

System.Array.CopyTo() performs deep copy and shallow.
Where as System.Array.clone() performs shallow copy.

System.Array.CopyTo() doesn't create new Array
System.Array.clone() create new Array of same length of existing array.

If System.Array.CopyTo()can perform both deep copy and
shallow then why System.Array.clone ?

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When was c# created?

614


What is the main method?

574


Is a char?

534


Is typeof c#?

616


What is a protected class in c#?

586






How does one compare strings in c#?

620


What is mean by c#?

592


How do you type a null character?

570


What is boxing? Explain its functionality?

639


What is Inheritance in C#?

653


What happens during the process of boxing?

706


What is an array class?

623


What are strongly typed objects?

575


Constructor to an arbitrary base constructor?

647


Is lazy t thread safe?

649