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;
}
}