LinePosition Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈