It’s easier to write
intArray1.CopyTo( intArray2, 0 )
than the for-loop equivalent, but System.Array does not provide any generic Copy/CopyTo methods.
Is it better to write the for-loop? Or is using Copy/CopyTo compiled or JIT’d efficiently enough?
Array.Copy/CopyTowill perform faster than a manual loop in most cases as it can do direct memory copying.If you don’t have huge arrays or speed is not an issue, use whatever would look best in your code where you need to copy the items.