WindowWidth 속성은 콘솔 창의 너비를 가져오거나 설정합니다.
변수를 선언합니다.
int width;
이제 현재 창의 너비를 가져옵니다.
width = Console.WindowWidth;
다음은 완전한 예입니다.
예시
using System;
using System.Numerics;
using System.Globalization;
class Demo {
static void Main() {
int width;
int height;
width = Console.WindowWidth;
height = Console.WindowHeight;
Console.WriteLine("Current window width = "+width);
Console.WriteLine("Current window height = "+height);
}
} 출력
Current window width = 0 Current window height = 0