Ejemplo n.º 1
0
        public int CompareTo(GameDateTime other)
        {
            if (ReferenceEquals(other, null))
            {
                return(1);
            }

            if (Year != other.Year)
            {
                return(Year.CompareTo(other.Year));
            }
            if (Season != other.Season)
            {
                return(Season.CompareTo(other.Season));
            }
            if (DayOfMonth != other.DayOfMonth)
            {
                return(DayOfMonth.CompareTo(other.DayOfMonth));
            }
            if (TimeOfDay != other.TimeOfDay)
            {
                return(TimeOfDay.CompareTo(other.TimeOfDay));
            }

            return(0);
        }
Ejemplo n.º 2
0
        public int CompareTo(Object o)
        {
            Day d = o as Day;

            return(DayOfMonth.CompareTo(d.DayOfMonth));
        }