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