Condividi tramite


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

'Dichiarazione
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

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

See Also

Reference

SnapshotPoint Structure

Subtraction Overload

Microsoft.VisualStudio.Text Namespace