VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/c-sharp-how-to-change-foreground-color-of-text-in-console/

⇱ C# | How to change Foreground Color of Text in Console - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C# | How to change Foreground Color of Text in Console

Last Updated : 28 Jan, 2019
Given the normal Console in C#, the default color of the text foreground is "Black". The task is to change this color to some other color. Approach: This can be done using the ForegroundColor property in the Console class of the System package in C#. Program 1: Changing the Console Foreground Color to Blue. Output: 👁 Image
Program 2: The list of available colors in which the ForegroundColor can be changed are
Output: 👁 Image
Comment
Article Tags:

Explore