VB.NET, C#, PowerShellを使用しているエンジニアのためのサイト。
基本的な使用方法から開発で役立つTipsまで幅広く取り扱っています。
コンソールの背景色を設定するには、BackgroundColorプロパティを使用します。
static void Main(string[] args) { Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine("Background color is Black"); Console.BackgroundColor = ConsoleColor.DarkBlue; Console.WriteLine("Background color is DarkBlue"); Console.BackgroundColor = ConsoleColor.DarkGreen; Console.WriteLine("Background color is DarkGreen"); Console.BackgroundColor = ConsoleColor.DarkYellow; Console.WriteLine("Background color is DarkYellow"); Console.BackgroundColor = ConsoleColor.DarkCyan; Console.WriteLine("Background color is DarkCyan"); Console.BackgroundColor = ConsoleColor.DarkRed; Console.WriteLine("Background color is DarkRed"); Console.ReadLine(); }