static public int[] Lengths(this IArrayDefinition array) { var lengths = new int[array.Rank]; for (int i = 0; i < array.Rank; i++) { lengths[i] = array.GetLength(i); } return(lengths); }
static public int GetOutOfBound(this IArrayDefinition array, int dimension) { return(array.GetLowerBound(dimension) + array.GetLength(dimension)); }