//Metodo para multidimensionar una matriz private Array ResizeArray(Object[] arr, int newSize) { Object[] temp = new Object[newSize]; for (int x = 0; x < arr.GetLongLength(0); x++) { temp[x] = arr[x]; } return temp; }
//=====================Operaciones Básicas================================= //Metodo para multidimensionar la matriz private static Array ResizeArray(Object [ , ] arr, int newSizes) { //var temp = Array.CreateInstance(arr.GetType().GetElementType(), newSizes); Object[,] temp = new Object[newSizes, newSizes]; for (int x = 0; x < arr.GetLongLength(0); x++) { for (int j = 0; j < arr.GetLongLength(0); j++) { temp[x, j] = arr[x, j]; } } //int length = arr.Length <= temp.Length ? arr.Length : temp.Length; //Array.ConstrainedCopy(arr, 0, temp, 0, length); return temp; }