Advertisement
Filkolev

ShowConsoleColors

Jan 8th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. class ShowConsoleColors
  5. {
  6.     static void Main(string[] args)
  7.     {
  8.         var colors = Enum.GetValues(typeof(ConsoleColor)).Cast<ConsoleColor>();
  9.         foreach (ConsoleColor color in colors)
  10.         {
  11.             Console.ForegroundColor = color;
  12.             Console.WriteLine($"{color.ToString()} ");
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement