public int CompareTo(object obj)
        {
            if (!(obj is WeeklyRecipe))
            {
                throw new ApplicationException("object is not a WeeklyRecipe");
            }

            WeeklyRecipe recipe = obj as WeeklyRecipe;

            if (YearNumber.CompareTo(recipe.YearNumber) == 0)
            {
                return(WeekNumber.CompareTo(recipe.WeekNumber));
            }
            else
            {
                return(YearNumber.CompareTo(recipe.YearNumber));
            }
        }
Esempio n. 2
0
 public int CompareTo(ScheduleWeek other)
 {
     return(WeekNumber.CompareTo(other.WeekNumber));
 }