c# - 是否可以在 .NET 中以彩色方式写入控制台?

标签 c# .net vb.net colors

写个命令行小工具,输出不同颜色就好了。这可能吗?

最佳答案

是的。看这个article .这是那里的一个例子:

Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("White on blue.");

enter image description here

关于c# - 是否可以在 .NET 中以彩色方式写入控制台?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2743260/

相关文章:

c# - 我如何在 "Create New Screen"上创建一个按钮,它将在 Lightswitch 中保存、关闭和启动一个新的 "Create New Screen"?

c# - 一些 Visual Studio 2010 或 C# 错误?还是我只是在做梦?

c# - 从类库项目中的 App.config 中读取

asp.net-mvc - Azure 应用服务 Web 应用编译错误

c# - 是否可以限制每秒的 Web 请求数?

c# - UITestException 未标记为可序列化

c# - Entity Framework V4 : "Code Only" performance considerations

c# - HelloWorld 由 Windows .NET 成功启动但不是由 MONO

c# - 将开发人员文档添加到 Visual Studio 项目的最佳方式

vb.net - vb.net中windows应用的全局化