using System; using System.Collections.Generic; namespace TellDontAsk1 { public class Calendar { private IList appointments = new List(); public IList Appointments { get { return appointments; } set { appointments = value; } } public bool Free(DateTime date) { foreach (var appointment in appointments) { if (appointment.Contains(date)) { return false; } } return true; } public Appointment AddAppointment() { Appointment appointment = new Appointment(); Appointments.Add(appointment); return appointment; } } }