獲取 C# 中控制檯的最大視窗高度和寬度
要獲取控制檯的最大視窗高度,程式碼如下 −
示例
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
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP