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

参数

返回值

类型:Int32
在两个点之间的偏移量,等效于 other.Position - this.Position.

异常

异常 条件
ArgumentException

两个点不属于同一快照。

.NET Framework 安全性

请参阅

参考

SnapshotPoint 结构

Microsoft.VisualStudio.Text 命名空间