- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Getting the Largest Window Height and Width of the Console in C#
To get the largest window height of the Console, the code is as follows −
Example
using System; public class Demo{ public static void Main(string[] args){ Console.WriteLine("Largest Window Height of the Console = "+Console.LargestWindowHeight); } }
Output
This will produce the following output −
Largest Window Height of the Console = 58
Example
To get the largest window width of the Console, the code is as follows −
using System; public class Demo{ public static void Main(string[] args){ Console.WriteLine("Largest Window Width of the Console = "+Console.LargestWindowWidth); } }
Output
This will produce the following output −
Largest Window Width of the Console = 190
Advertisements