SnapshotPoint.Subtraction Operator (SnapshotPoint, SnapshotPoint)
Calculates the offset between two SnapshotPoint objects.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Déclaration
Public Shared Operator - ( _
start As SnapshotPoint, _
other As SnapshotPoint _
) As Integer
public static int operator -(
SnapshotPoint start,
SnapshotPoint other
)
public:
static int operator -(
SnapshotPoint start,
SnapshotPoint other
)
static let inline (-)
start:SnapshotPoint *
other:SnapshotPoint : int
JScript does not support overloaded operators.
Parameters
- start
Type: Microsoft.VisualStudio.Text.SnapshotPoint
The starting point.
- other
Type: Microsoft.VisualStudio.Text.SnapshotPoint
The point from which to calculate the offset.
Return Value
Type: System.Int32
The offset between the two points, equivalent to start.Position - other.Position.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The two points do not belong to the same snapshot. |
Remarks
The following should always be true: start == other + (start - other).
.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.