Console.ForegroundColor method in C#

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


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.ForegroundColor method is used to change the foreground color of  text on console window.


using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication11


    class Program


        static void Main()


            Console.ForegroundColor = ConsoleColor.Red;


            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.