Jal*_*aid 10
Console.BackgroundColor//t set the background color for the text.
Console.ForegroundColor//to set the foreground color for the text.
Console.ResetColor();//set back the foreground color and background color to the default.
Run Code Online (Sandbox Code Playgroud)
你只需要设置
Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.Red;
Run Code Online (Sandbox Code Playgroud)
在http://www.dotnetperls.com/console-color上阅读所有相关内容
Console.ForegroundColor = ConsoleColor.Green;
Console.BackgroundColor = Console.Color.White;
Run Code Online (Sandbox Code Playgroud)