public int CompareTo(IDateTime dt) { if (this.Equals(dt)) return 0; else if (this < dt) return -1; else if (this > dt) return 1; throw new Exception("An error occurred while comparing two IDateTime values."); }