SnapshotPoint.Difference Method
Calculates the offset between this snapshot point and another snapshot point.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Public Function Difference ( _
other As SnapshotPoint _
) As Integer
public int Difference(
SnapshotPoint other
)
public:
int Difference(
SnapshotPoint other
)
member Difference :
other:SnapshotPoint -> int
public function Difference(
other : SnapshotPoint
) : int
Parameters
other
Type: Microsoft.VisualStudio.Text.SnapshotPointThe second snapshot point.
Return Value
Type: Int32
The offset between the two points, equivalent to other.Position - this.Position.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The two points do not belong to the same snapshot. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.