The WindowsLeft property gets or sets the leftmost position of the console window area relative to the screen buffer.
Declare an integer variable to get the leftmost position.
int left;
Now, use the Console.WindowLeft property.
left = Console.WindowLeft
Let us see the complete example.
Example
using System;
class Demo {
static void Main() {
int left;
left = Console.WindowLeft;
Console.WriteLine("Left position of the Console window = "+left);
}
}Output
Note: The output may vary accordingly based on the position of the Console Window
Left position of the Console window = 0