Esempio n. 1
0
        public void ExtendTo(int min, int max)
        {
            IntRange intRange = new IntRange(min, max);

            if (!intRange.IsSubrange(Range))
            {
                throw new Exception("Cannot extend to a smaller range.");
            }
            for (int i = min; i <= max; i++)
            {
                if (!function.ContainsKey(i))
                {
                    function.Add(i, i);
                }
            }

            Range = intRange;
        }