예제 #1
0
        public bool GetRangeOf(Double start, Double end, out double ceiling, out double bottom)
        {
            int startIndex = start <= Dates[0] ? 0 : Dates.FindIndex(x => x >= start);
            int endIndex   = end >= Dates.Last() ? Count - 1 : Dates.FindIndex(x => x >= end);

            if (startIndex < Count && startIndex >= 0 && endIndex < Count && endIndex >= 0)
            {
                ValueRangeOf(startIndex, endIndex, out ceiling, out bottom);
                return(true);
            }
            else
            {
                ceiling = -1;
                bottom  = -1;
                return(false);
            }
        }