convenience function to append contents of sourceArray to destinationArray
This commit is contained in:
parent
5e45a6d912
commit
4f1271a89a
@ -48,5 +48,11 @@ namespace MBS.Framework
|
|||||||
if (array.Length - (start + length) > -1)
|
if (array.Length - (start + length) > -1)
|
||||||
Array.Copy(old, start + length, array, start, array.Length - (start + length));
|
Array.Copy(old, start + length, array, start, array.Length - (start + length));
|
||||||
}
|
}
|
||||||
|
public static void Array_Append<T>(ref T[] destinationArray, T[] sourceArray)
|
||||||
|
{
|
||||||
|
int start = destinationArray.Length;
|
||||||
|
Array.Resize<T>(ref destinationArray, destinationArray.Length + sourceArray.Length);
|
||||||
|
Array.Copy(sourceArray, 0, destinationArray, start, sourceArray.Length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user