Console.WindowWidth প্রোপার্টি কনসোল উইন্ডোয়ের প্রস্থ (ক্যারেক্টার কাউন্ট) পাওয়া বা সেট করার জন্য ব্যবহৃত হয়। WindowHeight উচ্চতা দেয়।
উদাহরণ
using System;
using System.Numerics;
using System.Globalization;
class Demo
{
static void Main()
{
int width = Console.WindowWidth;
int height = Console.WindowHeight;
Console.WriteLine("Current window width = " + width);
Console.WriteLine("Current window height = " + height);
}
}
আউটপুট (নমুনা)
Current window width = 120 Current window height = 30
নোট: কিছু এনভায়রনমেন্টে (যেমন IDE আউটপুট উইন্ডো) এটি ০ ফেরত দেয়। বাফার সাইজের জন্য BufferWidth/BufferHeight ব্যবহার করুন।