Clear a Console : Console window settings « Development « C# / CSharp Tutorial






using System;

public class MainClass
{
    static void Main(string[] args) {
       // Change the console appearance and redisplay.
       Console.Title = "Cleared / Colored Console";
       Console.ForegroundColor = ConsoleColor.Blue;
       Console.BackgroundColor = ConsoleColor.Yellow;
       Console.Clear();
   }
}








14.8.Console window settings
14.8.1.Change console title
14.8.2.Change the Console Foreground and Background color
14.8.3.Change the Console Foreground and Background color and clear
14.8.4.Reset console color, window size, buffer height and width
14.8.5.Set cursor left, size, top and visible
14.8.6.Clear a Console