What is the difference b/w Arry.copy() and array.clone()
method?

Answers were Sorted based on User's Feedback



What is the difference b/w Arry.copy() and array.clone() method?..

Answer / vishalakshi patil

Array.copy() Copies a range of elements in one Array to
another Array and performs type casting and boxing as
required. Deep Copy

Return type Void

The Array.clone() is of the same Type as the original Array.

Shallow copy. Return type System.object

Is This Answer Correct ?    3 Yes 1 No

What is the difference b/w Arry.copy() and array.clone() method?..

Answer / chauhan rakesh botad

Array.Copy() copies all contents of original array to
another array by specied index of original array while Clone
creates a shallow copy. Array.Copy() copies Data as well as
structure while Clone copies data only.

Is This Answer Correct ?    2 Yes 0 No

What is the difference b/w Arry.copy() and array.clone() method?..

Answer / rasik bihari

Array.Copy() is deep copy and Array.clone() is shallow copy.

Is This Answer Correct ?    2 Yes 1 No

What is the difference b/w Arry.copy() and array.clone() method?..

Answer / chauhan rakesh botad

System.Array.copyto() will perform a deep copy of array
while system.array.Clone() will perform shalow copy of the
array.Shalow copy will simply copy the elements of the array
where as an Deep copy will copy the elements as well as any
referenced elements present in the array.

Is This Answer Correct ?    1 Yes 0 No

What is the difference b/w Arry.copy() and array.clone() method?..

Answer / vasanth

Array.copy() copies both structure and data to another array and its return type is void.
Array.Clone() copies only structure of array and its return type is Object.

Is This Answer Correct ?    0 Yes 0 No

What is the difference b/w Arry.copy() and array.clone() method?..

Answer / sanjaym

Array.copy() and array.clone() both gives Deep copy.

The main difference is array.clone() return type is object
so type casting is required...

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More C Sharp Interview Questions

What is namespace in oops?

0 Answers  


can you declare an override method to be static if the original method is not static?

0 Answers   Siebel Systems,


Can we inherit private members of class in c#?

0 Answers  


Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?

0 Answers  


How do you inherit from a class in C#?

1 Answers  






What are generations and how are they used by the garbage collector?

0 Answers  


What is difference between private and protected?

0 Answers  


What is class in oops with example in c#?

0 Answers  


what is the difference between convert.tostring() and tostring() functions ?

0 Answers   QuestPond,


what is accessspecifier and explation each with example?

3 Answers  


What are the drawbacks of extending an interface as opposed to extending a class?

0 Answers  


Can abstract class be sealed?

0 Answers  


Categories