Console.SetCursorPosition() Method in C# Last Updated : 14 Mar, 2019 Comments Improve Suggest changes Like Article Like Report Console.SetCursorPosition(Int32, Int32) Method is used to set the position of cursor. Basically, it specifies where the next write operation will begin in the console window. The window origin changes automatically to make the cursor visible if the specified cursor position is outside the area that is currently visible in the console window. Syntax: public static void SetCursorposition(int left, int top); Parameters: left: It is the column position of the cursor. Columns are numbered from left to right starting at 0. top: It is the row position of the cursor. Rows are numbered from top to bottom starting at 0. Exceptions: ArgumentOutOfRangeException: If the left or top is less than 0 or left >= BufferWidth or top >= BufferHeight. SecurityException: If the user doesn't have the permission to perform this action. Example: csharp // C# Program to illustrate // Console.CursorPosition() method using System; class GFG { // Main Method public static void Main() { // setting the window size Console.SetWindowSize(40, 40); // setting buffer size of console Console.SetBufferSize(80, 80); // using the method Console.SetCursorPosition(20, 20); Console.WriteLine("Hello GFG!"); Console.Write("Press any key to continue . . . "); Console.ReadKey(true); } } Output: When Console.SetCursorPosition() method is not used: Reference: https://docs.microsoft.com/en-us/dotnet/api/system.console.setcursorposition?view=netframework-4.7.2 Comment More infoAdvertise with us Next Article Console.SetCursorPosition() Method in C# K kanakasrijaathukuri Follow Improve Article Tags : C# Similar Reads Console.SetWindowPosition() Method in C# Console.SetWindowPosition(Int32, Int32) Method in C# is used to set the position of the console window relative to the screen buffer. Syntax: public static void SetWindowposition(int left, int top); Parameters: left: It is the column position of the upper left corner of the console window. top: It i 1 min read Console.SetIn() Method in C# The Console.SetIn() method is used to set the In property of the specified StreamReader object i.e. it redirects the standard input from the console to the input file. Since the console is set with this StreamReader object, the ReadLine() method can be called to read the contents of the file, line b 2 min read Console.SetOut() Method in C# Console.SetOut(TextWriter) Method in C# is used to redirect the stream of standard output. With the help of this method, a user can specify a StreamWriter as the output object. The Console.SetOut method will receive an object of type TextWriter. The StreamWriter can be passed to Console.SetOut and i 2 min read 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.SetWindowSize() Method in C# Console.SetWindowSize(Int32, Int32) Method is used to change the height and width of the console window to the specified values. Syntax: public static void SetWindowSize (int width, int height); Parameters: width: The width of the console window measured in columns. height: The height of the console 2 min read Like