C# ComboBox SQLServer - INSERT SELECT UPDATE DELETE

July 10, 2017 Oclemy C# Console 0 minutes, 22 seconds

A basic C# console background and foreground color tutorial.

What we do :

  • Set background color and foreground color of Console.

 

using System;

namespace Example_A
{
    class Program
    {
        static void Main(string[] args)
        {
            //SET COLORS
            Console.ForegroundColor=ConsoleColor.Cyan;
            Console.BackgroundColor=ConsoleColor.Gray;

            //PROMPT
            Console.WriteLine( "Whats You Name ?" );

            //get name
            string name = Console.ReadLine();

            //RESET FOREGROUND COLOR
            Console.ForegroundColor = ConsoleColor.Blue;

            //GREET
            Console.WriteLine("Hello "+name);

            //WAIT FOR KEY TO EXIT
            Console.ReadKey();
        }
    }
}

Cheers.

Comments