C# Console SetCursorPosition

Description

Console SetCursorPosition sets the position of the cursor.

Syntax

Console.SetCursorPosition has the following syntax.


public static void SetCursorPosition(
  int left,
  int top
)

Parameters

Console.SetCursorPosition has the following parameters.

  • left - The column position of the cursor. Columns are numbered from left to right starting at 0.
  • top - The row position of the cursor. Rows are numbered from top to bottom starting at 0.

Returns

Console.SetCursorPosition method returns

Example


using System;/*  www . j  a va  2s.co  m*/

class Sample 
{

    public static void Main() 
    {
        Console.SetCursorPosition(100, 100);
    }
}




















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version