C# Console WindowTop

Description

Console WindowTop gets or sets the top position of the console window area relative to the screen buffer.

Syntax

Console.WindowTop has the following syntax.


public static int WindowTop { get; set; }

Example


using System;//from   ww  w  .  ja  v a  2s. co  m

public class Example
{
   public static void Main()
   {
      ConsoleKeyInfo key;
      bool moved = false;

      Console.BufferWidth = 80;
      Console.Clear();

      int pos = Console.WindowLeft - 1;
      Console.WindowLeft = pos;
      
      pos = Console.WindowTop + 1;
      Console.WindowTop = pos;
      
   }
}




















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