OffsetRange 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.
RPC contract for a text range expressed as offset from the beginning of the document and length.
[System.Runtime.Serialization.DataContract]
public struct OffsetRange : IComparable<Microsoft.VisualStudio.RpcContracts.Editor.OffsetRange>, IEquatable<Microsoft.VisualStudio.RpcContracts.Editor.OffsetRange>
[<System.Runtime.Serialization.DataContract>]
type OffsetRange = struct
Public Structure OffsetRange
Implements IComparable(Of OffsetRange), IEquatable(Of OffsetRange)
- Inheritance
-
OffsetRange
- Attributes
- Implements
Remarks
OffsetRange is one of four closely related concepts:
Constructors
OffsetRange(Int32, Int32) |
Initializes a new instance of a OffsetRange with the specified start point, and length. |
Properties
End |
Gets the ending index of the range. |
Length |
Gets the length of the range. |
Start |
Gets the starting index of the range. |
Methods
CompareTo(OffsetRange) | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. |
Equals(Object) | Indicates whether this instance and a specified object are equal. |
Equals(OffsetRange) | Indicates whether the current object is equal to another object of the same type. |
GetHashCode() | Returns the hash code for this instance. |
ToTextRange(ITextDocumentSnapshot) |
Allows conversion to a TextRange. |
Translate(ITextDocumentSnapshot, ITextDocumentSnapshot, TextRangeTrackingMode) |
Translates this OffsetRange to an older or newer ITextDocumentSnapshot version. |
Operators
Implicit(TextRange to OffsetRange) |
Allows implicit conversion from a TextRange. |