如何在控制台中更改前景和背景文本颜色?我正在编写一个控制台C#程序。我想在控制台中更改文本的前景色和背景色。Console.BackgroundColor//t设置文本的背景色。Console.ForegroundColor//设置文本的前景色。Console.ResetColor();//设置前景色和背景色为默认值。你只需要设置Console.BackgroundColor=ConsoleColor.Blue;Console.ForegroundColor=ConsoleColor.Red;在http://www.dotnetperls.com/console-colorConsole.ForegroundColor=ConsoleColor.Green;阅读所有相关信息Console.BackgroundColor=Console.Color.White;您应该能够使用以下属性(链接到MSDN文档):Console.BackgroundColorConsole.ForegroundColorC#教程就是这些:如何在控制台中更改前景和背景文本颜色?如果所有分享的内容对你有用,需要进一步了解C#学习教程,希望大家多多关注。本文收集自网络,不代表立场。如涉及侵权,请点击右侧联系管理员删除。如需转载请注明出处:
