C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Minimum and maximum values for WindowHeight
Minimum height = 1
Maximum height = 83
Info: On the present system, it goes from the minimum height of 1 to the maximum height of 83 rows.
And: Depending on your screen resolution, you may have a different maximum number of rows.
C# program that tests Console.WindowHeight
using System;
using System.Threading;
class Program
{
static void Main()
{
for (int i = 1; i <= Console.LargestWindowHeight; i++)
{
Console.Clear();
Console.WriteLine("Height = {0}", i);
Console.WindowHeight = i;
Thread.Sleep(100);
}
}
}
Output
Height = 83
Press any key to continue...
Therefore: It might be better to use a size that is a few rows smaller than LargestWindowHeight. Try subtracting 20 from it.