Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void AppendSecondArrayToFirst<T>(ref T[] first, T[] second){
- int arrayOriginalSize = first.Length;
- Array.Resize<T>(ref first, first.Length + second.Length);
- Array.Copy(second, 0, first, arrayOriginalSize, second.Length);
- }
- public static T[] CreateCombinedArrayFrom<T>(T[] first, T[] second)
- {
- T[] result = new T[first.Length + second.Length];
- Array.Copy(first, 0, result, 0, first.Length);
- Array.Copy(second, 0, result, first.Length, second.Length);
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement