public void AddDay(TrainingCalendarDay day) { if ((day.Date < FirstDate) || (day.Date > LastDate)) { throw new ArgumentOutOfRangeException(" Day added " + day.Date + " is out of range for this week FirstDate " + FirstDate); } var dayIndex = (int)day.Date.DayOfWeek - 1; DaysOfWeek[dayIndex] = day; }
public void AddDay(TrainingCalendarDay day) { if ((day.Date < FirstDate) || (day.Date > LastDate)) throw new ArgumentOutOfRangeException(" Day added " + day.Date + " is out of range for this week FirstDate " + FirstDate); var dayIndex = (int) day.Date.DayOfWeek - 1; DaysOfWeek[dayIndex] = day; }