Table of Contents

Class TextPosition

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Represents a text position (line and column).

public record TextPosition : IEquatable<TextPosition>
Inheritance
TextPosition
Implements
Inherited Members

Constructors

TextPosition(int, int)

Represents a text position (line and column).

public TextPosition(int Line, int Column)

Parameters

Line int

The zero-based line number.

Column int

The zero-based column number.

Fields

Zero

Represents position (0, 0) - the origin position.

public static readonly TextPosition Zero

Field Value

TextPosition

Properties

Column

The zero-based column number.

public int Column { get; init; }

Property Value

int

Line

The zero-based line number.

public int Line { get; init; }

Property Value

int

Methods

IsAfter(TextPosition)

Returns true if this position is after the other position

public bool IsAfter(TextPosition other)

Parameters

other TextPosition

Returns

bool

IsBefore(TextPosition)

Returns true if this position is before the other position

public bool IsBefore(TextPosition other)

Parameters

other TextPosition

Returns

bool