How do I change the full background color of the console window in C#?

You need to clear the console window AFTER setting the colors but BEFORE you write the text…

Console.ForegroundColor = ConsoleColor.Red;
Console.BackgroundColor = ConsoleColor.Green;

Console.Clear();

Console.WriteLine("Hello World");

Console.ReadLine();

Leave a Comment