Answers for "how to set color in c#"

C#
4

how to change the color of your text in c#

using System;
class Demo {
   public static void Main (string[] args) {
      Console.BackgroundColor = ConsoleColor.Blue;
      Console.WriteLine("Background color changed = "+Console.BackgroundColor);
      Console.ForegroundColor = ConsoleColor.Yellow;
      Console.WriteLine("nForeground color changed = "+Console.ForegroundColor);
   }
}
Posted by: Guest on February-26-2021
0

C# Change color

//Text color
Console.ForegroundColor = ConsoleColor.Green;
//Background color
Console.BackgroundColor = ConsoleColor.Red;
Posted by: Guest on October-02-2021

Code answers related to "how to set color in c#"

C# Answers by Framework

Browse Popular Code Answers by Language