Changing Console Window's size throws ArgumentOutOfRangeException
From MSDN of Console.WindowHeight
property:
The height of the console window measured in rows.
As you can see, these are not pixels. Just remember, these values can change depending on your screen resolution and the console font. You can find maximum height and width values with Console.LargestWindowWidth
and Console.LargestWindowHeight
properties.
Console.WriteLine(Console.LargestWindowHeight);
Console.WriteLine(Console.LargestWindowWidth);