ExtensionMethod.NET Home of 876 C#, Visual Basic, F# and Javascript extension methods

Zero Index CopyTo

CopyTo without the second parameter, for when you just want to copy array A to array B verbatim and size is not a concern.


public static void CopyTo<T>(this T[] array, T[] target)
    array.CopyTo(target, 0);


array.CopyTo(target);   // no index argument required

Author: Benedict Tough

Submitted on: 10 jul 2017

Language: C#

Type: T[]

Views: 2876