private bool Equals(Time other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.Hour == Hour && other.Minute == Minute && other.Second == Second; }
public TimeRange(Time begin, Time end) { Begin = begin; End = end; }
private bool IsIn(Time Input) { if (Begin == End) return false; return Input >= Begin && Input <= End; }
public TimeRange(string TimeRange) { try { string b = TimeRange.Split('-')[0]; string e = TimeRange.Split('-')[1]; Begin = new Time(b); End = new Time(e); } catch { throw new FormatException("Invalid Time Format.Valid Format Is HH1:mm1:ss1-HH2:mm2:ss2"); } }