- 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.MoveBufferArea() Method in C#
The Console.MoveBufferArea() method in C# is used to copy a specified source area of the screen buffer to a specified destination area.
Syntax
The syntax is as follows −
public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop);
Here,
- sourceLeft
The leftmost column of the source area.
- sourceTop
The topmost row of the source area.
- sourceWidth
The number of columns in the source area.
- sourceHeight
The number of rows in the source area.
- targetLeft
The leftmost column of the destination area.
- targetTop
The topmost row of the destination area.
Example
Let us now see an example to implement the Console.MoveBufferArea() method in C# −
using System; class Demo { public static void Main (string[] args) { Console.WriteLine("Demo text!"); Console.MoveBufferArea(0, 0, Console.BufferWidth, Console.BufferHeight, 20, 20); } }
Output
This will produce the following output −
Advertisements
To Continue Learning Please Login
Login with Google