计算此快照点之间的偏移量,另一个快照点。
命名空间: 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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。