Reputation: 765
Simple question from .NET beginner. How to work with colors in console application? VS do not let me declarate System.Drawing.Color namespace. I need to assign color for one method in console application.
Regards, Tomas
Upvotes: 8
Views: 5522
Reputation: 572
This is actually very simple, for example:
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Yellow");
Upvotes: 7
Reputation: 1503519
All you need to do is add a reference to System.Drawing.dll
. This isn't included by default in a console app, but you can add it without any issues.
Upvotes: 16