问题
Is there a way to color the font of certain lines in a console app in .net?
Thanks
回答1:
http://msdn.microsoft.com/en-us/library/system.console.foregroundcolor.aspx
You can change the foreground and background colors of the console. The foreground color is of course the text.
回答2:
Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.Yellow;
来源:https://stackoverflow.com/questions/5299790/how-to-add-font-color-to-a-net-console-app