SnapshotPoint.Subtraction 運算子 (SnapshotPoint, SnapshotPoint)
計算兩個之間的位移SnapshotPoint物件。
命名空間: Microsoft.VisualStudio.Text
組件: Microsoft.VisualStudio.Text.Data (在 Microsoft.VisualStudio.Text.Data.dll 中)
語法
'宣告
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 不支援多載運算子。
參數
start
類型:Microsoft.VisualStudio.Text.SnapshotPoint起點。
other
類型:Microsoft.VisualStudio.Text.SnapshotPoint要從其中計算位移點。
傳回值
類型:Int32
在兩點之間,相當於位移start.Position - other.Position.
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentException | 兩個點不屬於相同的快照集。 |
備註
下列應永遠為真: start = = other + (start - other)。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。