Exemple #1
0
        static void Main(string[] args)
        {
            NoteBook notebook = new NoteBook(5);

            notebook.AddNote(new Note("Паша", "Чехов", "11.03.1991", "*****@*****.**", "375296367752"));
            notebook.AddNote(new Note("Даша", "Плоткина", "11.03.1991", "*****@*****.**", "375296367752"));
            notebook.AddNote(new Note("Паша", "Астахов", "11.03.1991", "*****@*****.**", "375296367752"));
            notebook.AddNote(new Note("Алексй", "Мирончук", "11.03.1991", "*****@*****.**", "375296367752"));
            notebook.AddNote(new Note("Костя", "Шмелев", "11.03.1991", "sdf", "375296367752"));
            notebook.AddNote(new Note("Настя", "Подворная", "11.03.1991", "*****@*****.**", "375296367752"));
            Console.WriteLine("До сортировки");
            ShowNotes(notebook);
            Console.WriteLine("После сортировки");
            notebook.Sort();
            ShowNotes(notebook);
            Console.WriteLine("Поиск Костя, Паша");
            NoteBook notebook2 = new NoteBook(notebook.FindAll("Костя", "Паша"));

            ShowNotes(notebook2);
            Console.WriteLine("Удаление 4 элемента");
            notebook.RemoveNote(4);
            ShowNotes(notebook);
        }