Export (0) Print
Expand All

SnapshotPoint Structure

An immutable text position in a particular text snapshot.

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

public struct SnapshotPoint : IComparable<SnapshotPoint>

The SnapshotPoint type exposes the following members.

  NameDescription
Public methodSnapshotPointInitializes a new instance of a SnapshotPoint with respect to a particular snapshot and position.
Top

  NameDescription
Public propertyPositionGets the position of the point.
Public propertySnapshotGets the ITextSnapshot to which this snapshot point refers.
Top

  NameDescription
Public methodAddCreates a new snapshot point at the specified offset from this point.
Public methodCompareToDetermines whether this snapshot is the same as a second snapshot point.
Public methodDifferenceCalculates the offset between this snapshot point and another snapshot point.
Public methodEqualsDetermines whether this snapshot point is the same as a second snapshot point. (Overrides ValueType.Equals(Object).)
Public methodGetCharGets the character at the position of this snapshot point.
Public methodGetContainingLineGets the ITextSnapshotLine containing this snapshot point.
Public methodGetHashCodeServes as a hash function for this type. (Overrides ValueType.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSubtractCreates a new snapshot point at the specified negative offset from this point.
Public methodToStringConverts this snapshot point to a string. (Overrides ValueType.ToString().)
Public methodTranslateToTranslates this snapshot point to a different snapshot of the same ITextBuffer.
Top

  NameDescription
Public operatorStatic memberAdditionIncrements the position of a snapshot point.
Public operatorStatic memberEqualityDetermines whether this snapshot point is the same as a second snapshot point.
Public operatorStatic memberGreaterThanDetermines whether the position of one snapshot point is greater than the position of a second snapshot point.
Public operatorStatic memberImplicit(SnapshotPoint to Int32)Implicitly converts the snapshot point to an integer equal to the position of the snapshot point in the snapshot.
Public operatorStatic memberInequalityDetermines whether this snapshot point is different from a second snapshot point.
Public operatorStatic memberLessThanDetermines whether the position of the left point is less than the position of the right point.
Public operatorStatic memberSubtraction(SnapshotPoint, SnapshotPoint)Calculates the offset between two SnapshotPoint objects.
Public operatorStatic memberSubtraction(SnapshotPoint, Int32)Decrements the position of a snapshot point.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft