how to change text color c# code example
Example 1: c# console foreground color
Console.ForegroundColor = ConsoleColor.DarkGreen;
Example 2: assign color to value in c#
Color redColor = Color.FromArgb(255, 0, 0);
Example 3: change line color in c#
//set the foreground color to cyan
Console.ForegroundColor=ConsoleColor.cyan;