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
Fields
Zero
Represents position (0, 0) - the origin position.
public static readonly TextPosition Zero
Field Value
Properties
Column
The zero-based column number.
public int Column { get; init; }
Property Value
Line
The zero-based line number.
public int Line { get; init; }
Property Value
Methods
IsAfter(TextPosition)
Returns true if this position is after the other position
public bool IsAfter(TextPosition other)
Parameters
otherTextPosition
Returns
IsBefore(TextPosition)
Returns true if this position is before the other position
public bool IsBefore(TextPosition other)
Parameters
otherTextPosition