public int CompareTo(IPeriod p) { if (p == null) { throw new ArgumentNullException("p"); } else if (Equals(p)) { return(0); } else if (StartTime.LessThan(p.StartTime)) { return(-1); } else if (StartTime.GreaterThanOrEqual(p.StartTime)) { return(1); } throw new Exception("An error occurred while comparing Period values."); }