Пример #1
0
    private static void Main()
    {
        var calendar = new WeeklyCalendar();

        calendar.AddEntry("Monday", "Internal meeting");
        calendar.AddEntry("Tuesday", "Create presentation");
        calendar.AddEntry("Tuesday", "Create lab and exercise");
        calendar.AddEntry("Thursday", "Enum Lecture");
        calendar.AddEntry("Monday", "Second internal meeting");

        foreach (var weeklyEntry in calendar.WeeklySchedule.OrderBy(n => n).ToList())
        {
            Console.WriteLine(weeklyEntry);
        }
    }
Пример #2
0
    public static void Main(string[] args)
    {
        WeeklyCalendar calendar = new WeeklyCalendar();

        calendar.AddEntry("Monday", "Internal Meeting");
        calendar.AddEntry("Tuesday", "Party");
        calendar.AddEntry("Wednesday", "Liga");
        calendar.AddEntry("Thursday", "Enum Lecture");
        calendar.AddEntry("Friday", "Ready for take-off");
        var ordered = calendar.WeeklySchedule.OrderBy(n => n).ToList();

        foreach (var weeklyEntry in ordered)
        {
            Console.WriteLine(weeklyEntry);
        }
    }
    public static void Main()
    {
        WeeklyCalendar calendar = new WeeklyCalendar();

        calendar.AddEntry(Weekday.Monday.ToString(), "Internal meeting");
        calendar.AddEntry(Weekday.Tuesday.ToString(), "Create presentation");
        calendar.AddEntry(Weekday.Tuesday.ToString(), "Create lab and exercise");
        calendar.AddEntry(Weekday.Thursday.ToString(), "Enum Lecture");
        calendar.AddEntry(Weekday.Monday.ToString(), "Second internal meeting");

        var ordered = calendar.WeeklySchedule().OrderBy(n => n).ToList();

        foreach (var weeklyEntry in ordered)
        {
            Console.WriteLine(weeklyEntry);
        }
    }