コード例 #1
0
        static void Main(string[] args)
        {
            var personRegister = new PersonRegister();

            personRegister.PersonAddedHandlerEvent += ConsoleHandler;
            personRegister.PersonAddedHandlerEvent += PrintHandler;
            personRegister.ReadPersonsFromFile("Resources/Persons.txt");
            personRegister.Sort(CompareBySurname);
            personRegister.Sort(CompareByFirstname);
            personRegister.PrintPersons();

            Console.WriteLine("First Match:");
            Person p = personRegister.FindPerson(ContainsA);

            Console.WriteLine($"{p.Firstname} {p.Surname}");
            Console.ReadKey();
        }