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)
Syntax
'Declaration
Public Structure SnapshotPoint _
Implements IComparable(Of SnapshotPoint)
public struct SnapshotPoint : IComparable<SnapshotPoint>
public value class SnapshotPoint : IComparable<SnapshotPoint>
[<Sealed>]
type SnapshotPoint =
struct
interface IComparable<SnapshotPoint>
end
JScript supports the use of structures, but not the declaration of new ones.
The SnapshotPoint type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SnapshotPoint | Initializes a new instance of a SnapshotPoint with respect to a particular snapshot and position. |
Top
Properties
Name | Description | |
---|---|---|
Position | Gets the position of the point. | |
Snapshot | Gets the ITextSnapshot to which this snapshot point refers. |
Top
Methods
Name | Description | |
---|---|---|
Add | Creates a new snapshot point at the specified offset from this point. | |
CompareTo | Determines whether this snapshot is the same as a second snapshot point. | |
Difference | Calculates the offset between this snapshot point and another snapshot point. | |
Equals | Determines whether this snapshot point is the same as a second snapshot point. (Overrides ValueType.Equals(Object).) | |
GetChar | Gets the character at the position of this snapshot point. | |
GetContainingLine | Gets the ITextSnapshotLine containing this snapshot point. | |
GetHashCode | Serves as a hash function for this type. (Overrides ValueType.GetHashCode().) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Subtract | Creates a new snapshot point at the specified negative offset from this point. | |
ToString | Converts this snapshot point to a string. (Overrides ValueType.ToString().) | |
TranslateTo | Translates this snapshot point to a different snapshot of the same ITextBuffer. |
Top
Operators
Name | Description | |
---|---|---|
Addition | Increments the position of a snapshot point. | |
Equality | Determines whether this snapshot point is the same as a second snapshot point. | |
GreaterThan | Determines whether the position of one snapshot point is greater than the position of a second snapshot point. | |
Implicit(SnapshotPoint to Int32) | Implicitly converts the snapshot point to an integer equal to the position of the snapshot point in the snapshot. | |
Inequality | Determines whether this snapshot point is different from a second snapshot point. | |
LessThan | Determines whether the position of the left point is less than the position of the right point. | |
Subtraction(SnapshotPoint, SnapshotPoint) | Calculates the offset between two SnapshotPoint objects. | |
Subtraction(SnapshotPoint, Int32) | Decrements the position of a snapshot point. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.