如何更改前景和背景文本颜色在控制台?
问题描述:
我正在写一个控制台C#程序。我想改变前景和控制台文字的背景色。
I'm writing a console C# program. I would like to change the foreground and the background color of the text in console.
答
您只需要设置
Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.Red;
阅读所有关于它在的 http://www.dotnetperls.com/console-color