Exemplo n.º 1
0
 private static void RunExample(RunnableExample example)
 {
     Console.Clear();
     Console.WriteLine($"=== {example.Name} ===\n");
     example.Run();
 }
Exemplo n.º 2
0
        private static bool GetExample(ConsoleKeyInfo choice, out RunnableExample example)
        {
            var intChoice = (int)char.GetNumericValue(choice.KeyChar);

            return(examples.TryGetValue(intChoice, out example));
        }