示例#1
0
        public static void MenuExercises()
        {
            CreateExercisesList();
            Console.WriteLine("> Menu Exercises: ");
            foreach (var exercise in Exercises)
            {
                Console.WriteLine(exercise);
            }
            Console.WriteLine("Write the number of the example you want to see:");

            var input  = Console.ReadLine();
            var select = 0;

            if (input == null)
            {
                Console.WriteLine("You must choose.");
                MenuExercises();
                return;
            }

            select = Int32.Parse(input);

            switch (select)
            {
            case 0:
                Menu();
                break;

            case 1:
                Console.Clear();
                Exercise1.Run();
                break;

            default:
                Console.Clear();
                Console.WriteLine("That exercise doesn't exist.");
                MenuExercises();
                break;
            }
        }