#region << Using Directives >>
using System;
#endregion
namespace Volpe.Cafe.Utils
{
    [Serializable]
    public static class ArrayExtension
    {
        #region 
        #region 
        public static bool[] CloneArray(this bool[] array)
        {
            return (bool[])array.Clone();
        }
        public static char[] CloneArray(this char[] array)
        {
            return (char[])array.Clone();
        }
        public static string[] CloneArray(this string[] array)
        {
            return (string[])array.Clone();
        }
        #endregion
        #region 
        public static sbyte[] CloneArray(this sbyte[] array)
        {
            return (sbyte[])array.Clone();
        }
        public static byte[] CloneArray(this byte[] array)
        {
            return (byte[])array.Clone();
        }
        public static short[] CloneArray(this short[] array)
        {
            return (short[])array.Clone();
        }
        public static ushort[] CloneArray(this ushort[] array)
        {
            return (ushort[])array.Clone();
        }
        public static int[] CloneArray(this int[] array)
        {
            return (int[])array.Clone();
        }
        public static uint[] CloneArray(this uint[] array)
        {
            return (uint[])array.Clone();
        }
        public static long[] CloneArray(this long[] array)
        {
            return (long[])array.Clone();
        }
        public static ulong[] CloneArray(this ulong[] array)
        {
            return (ulong[])array.Clone();
        }
        #endregion
        #region 
        public static float[] CloneArray(this float[] array)
        {
            return (float[])array.Clone();
        }
        public static double[] CloneArray(this double[] array)
        {
            return (double[])array.Clone();
        }
        public static double[][] CloneArray(this double[][] array)
        {
            double[][] newArray = new double[array.Length][];
            for (int i = 0; i < array.Length; i++)
            {
                newArray[i] = array[i].CloneArray();
            }
            return newArray;
        }
        #endregion
        #endregion
    }
}

