Để có được chiều cao cửa sổ lớn nhất của Bảng điều khiển, mã như sau -
Ví dụ
using System;
public class Demo{
public static void Main(string[] args){
Console.WriteLine("Largest Window Height of the Console = "+Console.LargestWindowHeight);
}
} Đầu ra
Điều này sẽ tạo ra kết quả sau -
Largest Window Height of the Console = 58
Ví dụ
Để có được chiều rộng cửa sổ lớn nhất của Bảng điều khiển, mã như sau -
using System;
public class Demo{
public static void Main(string[] args){
Console.WriteLine("Largest Window Width of the Console = "+Console.LargestWindowWidth);
}
} Đầu ra
Điều này sẽ tạo ra kết quả sau -
Largest Window Width of the Console = 190