Hello,
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
Hello,
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
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.
This is actually very simple, for example:
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Yellow");