24 lines
760 B
C#
24 lines
760 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.Net.Standard.Base.Utils
|
|
{
|
|
//=======================================================================
|
|
public static class ArrayUtil
|
|
{
|
|
//-------------------------------------------------------------------
|
|
/// <summary>Concatenate 2 arrays.</summary>
|
|
public static T[] ConcatArrays<T> (T[] array1, T[] array2)
|
|
{
|
|
T[] newArray = new T[array1.Length + array2.Length];
|
|
Array.Copy(array1, 0, newArray, 0, array1.Length);
|
|
Array.Copy(array2, 0, newArray, array1.Length, array2.Length);
|
|
return newArray;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|