Console.Clear() : Console « System « C# / C Sharp by API






Console.Clear()

 
using System;

public class Test{
   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();
      Console.WriteLine("Press Enter to change the Console's appearance.");
      Console.ReadLine();
  }
}

   
  








Related examples in the same category

1.Console.BackgroundColor
2.Console.Beep()
3.Console.Beep(200, 300)
4.Console.BufferHeight
5.Console.BufferWidth
6.Console.CursorLeft
7.Console.CursorSize
8.Console.CursorTop
9.Console.CursorVisible
10.Console.ForegroundColor
11.Console.In
12.Console.Out
13.Console.Read()
14.Console.ReadLine()
15.Console.ResetColor()
16.Console.SetOut
17.Console.SetWindowSize
18.Console.Title
19.Console.Write
20.Console.WriteLine