Partager via


TextPosition.Difference(TextPosition) Method

Definition

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.

Applies to