Click or drag to resize

LinePosition Class



Immutable representation of a line number and position within a SourceText instance.
Inheritance Hierarchy
SystemValueType
  Microsoft.CodeAnalysis.TextLinePosition

Namespace:  Microsoft.CodeAnalysis.Text
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public sealed class LinePosition : ValueType, 
	IEquatable, IComparable

The LinePosition type exposes the following members.

Constructors
  NameDescription
Public methodLinePosition
Initializes a new instance of a LinePosition with the given line and character.
Top
Properties
  NameDescription
Public propertyCharacter
The character position within the line.
Public propertyLine
The line number. The first line in a file is defined as line 0 (zero based line numbering).
Public propertyStatic memberZero
A LinePosition that represents position 0 at line 0.
Top
Methods
  NameDescription
Public methodCompareTo
Public methodEquals(Object)
Determines whether two LinePosition are the same.
Public methodEquals(LinePosition)
Determines whether two LinePosition are the same.
Public methodGetHashCode
Provides a hash function for LinePosition.
Public methodCode exampleToString
Provides a string representation for LinePosition.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two LinePosition are the same.
Public operatorStatic memberGreaterThan
Public operatorStatic memberGreaterThanOrEqual
Public operatorStatic memberInequality
Determines whether two LinePosition are different.
Public operatorStatic memberLessThan
Public operatorStatic memberLessThanOrEqual
Top
See Also