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