C# Console Clear

Description

Console Clear clears the console buffer and corresponding console window of display information.

Syntax

Console.Clear has the following syntax.


public static void Clear()

Returns

Console.Clear method returns

Example

The following example uses the Clear method to clear the console.


/*from  w  w w .j a  v  a  2 s  .  co  m*/
using System;

public class Example
{
   public static void Main()
   {
      Console.Clear();
   }
}




















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version