1.

What Is The Difference Between The System.array.copyto() And System.array.clone() ?

Answer»

System.ARRAY.CopyTo()-->It require a destination array to be EXISTED before and it must be capable to hold all the ELEMENTS in the source array from the index that is SPECIFIED to copy from the source array.

System.Array.Clone()-->It does not require the destination array to be existed as it creates a NEW one from scratch.

Note-These both are used as a shallow copy.

System.Array.CopyTo()-->It require a destination array to be existed before and it must be capable to hold all the elements in the source array from the index that is specified to copy from the source array.

System.Array.Clone()-->It does not require the destination array to be existed as it creates a new one from scratch.

Note-These both are used as a shallow copy.



Discussion

No Comment Found