private void ValidateBounds(long[] upperBounds)
{
long lastBound = -1L;
foreach (long bound in upperBounds)
{
if (bound <= 0L)
{
throw new ArgumentOutOfRangeException("Bounds must be positive values");
}
if (bound <= lastBound)
{
throw new ArgumentOutOfRangeException("bound " + bound + " is not greater than " + lastBound);
}
lastBound = bound;
}
}