VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/console-clear-method-in-c-sharp/

⇱ Console.Clear Method in C# - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Console.Clear Method in C#

Last Updated : 29 Jan, 2019
This method is used to clear the console buffer and corresponding console window of display information.
Syntax: public static void Clear (); Exceptions: This method throws IOException if an I/O error occurred.
Below programs show the use of Console.Clear() method: Program 1: To display the contents before the use of Clear method
Output:
GeeksForGeeks
A Computer Science Portal
For Geeks
Program 2: Use clear() method to clear the console
Output:

Comment
Article Tags:

Explore