Using the Console.Clear method is equivalent invoking the MS-DOS cls command in the command prompt window. When the Console.Clear method is called, the cursor automatically scrolls to the top-left corner of the window and the contents of the screen buffer are set to blanks using the current foreground background colors.
Attempting to call the Console.Clear method when a console application's output is redirected to a file throws a System.IO.IOException. To prevent this, always wrap a call to the Console.Clear method in a try…catch block.