TextPosition.Difference(TextPosition) Method
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.
Computes the offset between this snapshot position and another snapshot position.
public int Difference (Microsoft.VisualStudio.Extensibility.Editor.TextPosition other);
member this.Difference : Microsoft.VisualStudio.Extensibility.Editor.TextPosition -> int
Public Function Difference (other As TextPosition) As Integer
Parameters
- other
- TextPosition
The position from which to compute the offset.
Returns
The offset between the two positions, equivalent to other.Offset - this.Offset.
Exceptions
The two positions do not belong to the same snapshot.