Läs på engelska Redigera

Dela via


Console.GetCursorPosition Method

Definition

Gets the position of the cursor.

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static (int Left, int Top) GetCursorPosition ();
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static (int Left, int Top) GetCursorPosition ();

Returns

The column and row position of the cursor.

Attributes

Remarks

Columns are numbered from left to right starting at 0. Rows are numbered from top to bottom starting at 0.

Applies to

Produkt Versioner
.NET 5, 6, 7, 8, 9