SnapshotPoint.Difference 方法
計算這個快照集點和另一個快照集點之間的位移。
命名空間: Microsoft.VisualStudio.Text
組件: Microsoft.VisualStudio.Text.Data (在 Microsoft.VisualStudio.Text.Data.dll 中)
語法
'宣告
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
參數
other
類型:Microsoft.VisualStudio.Text.SnapshotPoint第二個的快照集點。
傳回值
類型:Int32
在兩點之間,相當於位移other.Position - this.Position.
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentException | 兩個點不屬於相同的快照集。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。