erehh

Csharp console color

Aug 20th, 2022
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. using System;
  2.  
  3. namespace helloWorld
  4. {
  5.     class Programm
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string phrase;
  10.             string name;
  11.            
  12.             phrase = "Hello ";
  13.             name = "Nick";
  14.  
  15.             Console.ForegroundColor = ConsoleColor.Black;
  16.             Console.BackgroundColor = ConsoleColor.DarkYellow;
  17.             Console.Clear();
  18.             Console.WriteLine(phrase + name);
  19.             Console.Read();          
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment