示例#1
0
 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;
 }
示例#2
0
 public TimeRange(Time begin, Time end)
 {
     Begin = begin;
     End = end;
 }
示例#3
0
 private bool IsIn(Time Input)
 {
     if (Begin == End) return false;
     return Input >= Begin && Input <= End;
 }
示例#4
0
        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");
            }
        }