- 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
Console.SetBufferSize() Method in C#
The Console.SetBufferSize() Method in C# is used to set the height and width of the screen buffer area to the specified values.
Syntax
The syntax is as follows −
public static void SetBufferSize (int width, int height);
Above, the parameter width is the width of the buffer area, whereas height is the height of the buffer area.
Example
Let us now see an example to implement the Console.SetBufferSize() Method in C# −
using System; class Demo { public static void Main (string[] args) { Console.BackgroundColor = ConsoleColor.White; Console.ForegroundColor = ConsoleColor.Red; Console.SetBufferSize(400, 400); while (true) { Console.WriteLine("Our demo text!"); } } }
Output
This will produce the following output −
Advertisements
To Continue Learning Please Login
Login with Google