public static void Main()
int[] lowerBounds = {1,2000};
int[] upperBounds = {10,2010};
int size = ArraySize(lowerBounds, upperBounds);
public static int ArraySize(int[] lower_bounds, int[] upper_bounds)
for (int i = 0; i < lower_bounds.Length; i++)
totalSize = totalSize * (upper_bounds[i] - lower_bounds[i]);
public static int[] InitializeArray(int[] bounds)
int numDimensions = bounds.Length / 2;
for (int i = numDimensions - 1; i >= 0; i--)