为了获得控制台的最大窗口高度,代码如下-
using System; public class Demo{ public static void Main(string[] args){ Console.WriteLine("Largest Window Height of the Console = "+Console.LargestWindowHeight); } }
输出结果
这将产生以下输出-
Largest Window Height of the Console = 58
为了获得控制台最大的窗口宽度,代码如下-
using System; public class Demo{ public static void Main(string[] args){ Console.WriteLine("Largest Window Width of the Console = "+Console.LargestWindowWidth); } }
输出结果
这将产生以下输出-
Largest Window Width of the Console = 190