Partager via


LinePosition Struct

Definition

Immutable representation of a line number and position within a SourceText instance.

public value class LinePosition : IComparable<Microsoft::CodeAnalysis::Text::LinePosition>, IEquatable<Microsoft::CodeAnalysis::Text::LinePosition>
public readonly struct LinePosition : IComparable<Microsoft.CodeAnalysis.Text.LinePosition>, IEquatable<Microsoft.CodeAnalysis.Text.LinePosition>
[System.Runtime.Serialization.DataContract]
public readonly struct LinePosition : IComparable<Microsoft.CodeAnalysis.Text.LinePosition>, IEquatable<Microsoft.CodeAnalysis.Text.LinePosition>
type LinePosition = struct
[<System.Runtime.Serialization.DataContract>]
type LinePosition = struct
Public Structure LinePosition
Implements IComparable(Of LinePosition), IEquatable(Of LinePosition)
Inheritance
LinePosition
Attributes
Implements

Constructors

LinePosition(Int32, Int32)

Initializes a new instance of a LinePosition with the given line and character.

Properties

Character

The character position within the line.

Line

The line number. The first line in a file is defined as line 0 (zero based line numbering).

Zero

A LinePosition that represents position 0 at line 0.

Methods

CompareTo(LinePosition)
Equals(LinePosition)

Determines whether two LinePosition are the same.

Equals(Object)

Determines whether two LinePosition are the same.

GetHashCode()

Provides a hash function for LinePosition.

ToString()

Provides a string representation for LinePosition.

Operators

Equality(LinePosition, LinePosition)

Determines whether two LinePosition are the same.

GreaterThan(LinePosition, LinePosition)
GreaterThanOrEqual(LinePosition, LinePosition)
Inequality(LinePosition, LinePosition)

Determines whether two LinePosition are different.

LessThan(LinePosition, LinePosition)
LessThanOrEqual(LinePosition, LinePosition)

Applies to