SnapshotPoint::Difference Method (SnapshotPoint)

 

Calculates the offset between this snapshot point and another snapshot point.

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public:
int Difference(
	SnapshotPoint other
)

Parameters

other
Type: Microsoft.VisualStudio.Text::SnapshotPoint

The second snapshot point.

Return Value

Type: System::Int32

The offset between the two points, equivalent to other.Position - this.Position.

Exception Condition
ArgumentException

The two points do not belong to the same snapshot.

Return to top
Show: