示例#1
0
        static void MainMenu(ConsoleKey option)
        {
            Console.Clear();
            switch (option)
            {
            case ConsoleKey.D1:
                Console.WriteLine("Press 1 to create a cat or 2 to create a dog");
                var switchOption = Console.ReadKey(true).Key;
                CreateAnimal(switchOption);
                break;

            case ConsoleKey.D2:
                PrintNrInPopulation(animalsList.GetList());
                break;

            default:
                Console.WriteLine("Please press any key to go back and choose between 1 and 2 to do action or esc to exit");
                break;
            }
        }