C#コンソールアプリでゲームを作る際に便利な小技を覚えよう

namespace ClearLesson {
    class MainClass {
        public static void Main(string[] args) {
            string lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
            while (true) {
                Console.Write("1...Red,2...Blue,3...ClearConsole,4...End>");
                int select = int.Parse(Console.ReadLine());
                switch (select) {
                    case 1:
                        //文字色を赤に変更
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine(lorem);
                        //コンソールカラーをリセット
                        Console.ResetColor();
                        break;
                    case 2:
                        Console.ForegroundColor = ConsoleColor.Blue;
                        //背景色を黄色
                        Console.BackgroundColor = ConsoleColor.Yellow;
                        Console.WriteLine(lorem);
                        Console.ResetColor();
                        break;
                    case 3:
                        //コンソールクリア
                        Console.Clear();
                        break;
                    default:
                        Console.WriteLine("終了");
                        return;

                }
            }
        }
    }
}