Console.BackgroundColor method in C#

In this article, I will explain you about Console.BackgroundColor method in C#.
  • 6527


Console applications are run on a black and white screen. We can change the background and foreground color of a console application. This makes program easier to use and more expressive. Console.BackgroundColor method is used to change the background color of text on console window. We can also define the important information.


using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication11


    class Program


        static void Main()


            Console.BackgroundColor = ConsoleColor.Blue;


            Console.WriteLine(" *is ");

            Console.WriteLine("  *a");

            Console.WriteLine("   *very");

            Console.WriteLine("    *beautiful");

            Console.WriteLine("     Girl*********************");






The output of above program


© 2020 DotNetHeaven. All rights reserved.