1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Array Copy

Added copying without specifying offsets.
This commit is contained in:
Damian Day 2020-05-27 14:53:02 +01:00
parent bff1d657cc
commit e9a7625d8b

View file

@ -116,6 +116,14 @@ namespace System
arr[i] = default(T);
}
public static void Copy<T, T2>(T[] sourceArray, T2[] destinationArray, int length) where T : var where T2 : var
{
Debug.Assert(sourceArray != null);
Debug.Assert(destinationArray != null);
Copy(sourceArray, 0, destinationArray, 0, length);
}
public static void Copy<T, T2>(T[] arrayFrom, int srcOffset, T2[] arrayTo, int dstOffset, int length) where T : var where T2 : var
{
if (((Object)arrayTo == (Object)arrayFrom) && (dstOffset > srcOffset))