FastQuant.TimeSeries.EnsureIndexInRange C# (CSharp) Méthode

EnsureIndexInRange() private méthode

private EnsureIndexInRange ( System.DateTime dt1, System.DateTime dt2, int &idx1, int &idx2 ) : void
dt1 System.DateTime
dt2 System.DateTime
idx1 int
idx2 int
Résultat void
        private void EnsureIndexInRange(DateTime dt1, DateTime dt2, out int idx1, out int idx2)
        {
            if (dt1 >= dt2)
                throw new ArgumentException("dateTime1 must be smaller than dateTime2");
            idx1 = GetIndex(dt1, IndexOption.Null);
            idx2 = GetIndex(dt2, IndexOption.Null);
            if (idx1 == -1)
                throw new ArgumentOutOfRangeException("dateTime1 is out of range");
            if (idx2 == -1)
                throw new ArgumentOutOfRangeException("dateTime2 is out of range");
        }
    }

Same methods

TimeSeries::EnsureIndexInRange ( int index1, int index2 ) : void