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