I have this Consoleartistic function,
public static void Ask(string message)
{
ConsoleColor previousColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.White;
Console.Write (message);
Console.Write (" : ");
Console.ForegroundColor = previousColor;
}
This is my Main()
Console.WriteLine("Hello World");
Ask("Roll No");
Two printed colors whitedo not match as shown below

In the debugger, I see that previousColoras well ConsoleColor.White.
source
share