Console.MoveBufferArea Method in C# Last Updated : 07 Jun, 2022 Comments Improve Suggest changes Like Article Like Report Console.MoveBufferArea Method is used to move the specified screen area to destination area. Syntax: public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop); Parameters: 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. Exceptions: ArgumentOutOfRangeException:One or more of the parameters is less than zero.If sourceLeft or targetLeft is greater than or equal to BufferWidth.If sourceTop or targetTop is greater than or equal to BufferHeight.If sourceTop + sourceHeight is greater than or equal to BufferHeight.If sourceLeft + sourceWidth is greater than or equal to BufferWidth.IOException: If an I/O error occurred. Example 1: csharp // C# program to print GeeksForGeeks using System; namespace GFG { class Program { static void Main(string[] args) { Console.WriteLine("GeeksForGeeks"); } } } Output: Example 2: csharp // C# program to change area // of GeeksForGeeks using System; namespace GFG { class Program { static void Main(string[] args) { Console.WriteLine("GeeksForGeeks"); // using the method Console.MoveBufferArea(0, 0, Console.BufferWidth, Console.BufferHeight, 10, 10); } } } Output: Note: See the difference of text positions in output images.If the destination and source parameters specify a position located outside the boundaries of the current screen buffer, only the portion of the source area that fits within the destination area is copied. That is, the source area is clipped to fit the current screen buffer.The MoveBufferArea method copies the source area to the destination area. If the destination area does not intersect the source area, the source area is filled with blanks using the current foreground and background colors. Otherwise, the intersected portion of the source area is not filled. Reference: https://docs.microsoft.com/en-us/dotnet/api/system.console.movebufferarea?view=netframework-4.7.2 Comment More infoAdvertise with us Next Article Console.MoveBufferArea Method in C# S ShivamChauhan5 Follow Improve Article Tags : C# CSharp-method CSharp-Console-Class Similar Reads Console.SetBufferSize() Method in C# Console.SetBufferSize(Int32, Int32) Method is used to set the height and width of the screen buffer area to the specified values. Syntax: public static void SetBufferSize(int width, int height); Parameters: width: It sets the width of the buffer area measured in the form of columns. height: It sets 2 min read Console.Read() Method in C# Console.Read() Method is used to read the next character from the standard input stream. This method basically blocks its return when the user types some input characters. As soon as the user press ENTER key it terminates. Syntax: public static int Read (); Return Value: It returns the next characte 1 min read Console.SetError() Method in C# The Console.SetError(TextWriter) Method sets the Error property of the specified StreamWriter i.e., it redirects the standard error stream to a file. As the console is set with this StreamWriter object, the WriteLine() method can be called to write the error into the file. Syntax: public static void 2 min read Console.ReadKey() Method in C# Console.ReadKey() Method makes the program wait for a key press and it prevents the screen until a key is pressed. In short, it obtains the next character or any key pressed by the user. The pressed key is displayed in the console window(if any input process will happen). There are two methods in th 5 min read Console.ReadLine() Method in C# This method is used to read the next line of characters from the standard input stream. It comes under the Console class(System Namespace). If the standard input device is the keyboard, the ReadLine method blocks until the user presses the Enter key. And if standard input is redirected to a file, th 2 min read Like