Exemplo n.º 1
0
        public int CompareTo(object otherObj)
        {
            if (!(otherObj is ElectionPhaseForm otherForm))
            {
                throw new Exception("Cannot compare ElectionPhaseForm with other types");
            }

            return(BeginsAt.CompareTo(otherForm.EndsAt));
        }
Exemplo n.º 2
0
 public bool ContainsDate(DateTime date)
 {
     return(date >= BeginsAt && date < BeginsAt.AddDays(Length));
 }