Partilhar via


SnapshotPoint Struct

Definition

An immutable text position in a particular text snapshot.

public value class SnapshotPoint : IComparable<Microsoft::VisualStudio::Text::SnapshotPoint>
public struct SnapshotPoint : IComparable<Microsoft.VisualStudio.Text.SnapshotPoint>
type SnapshotPoint = struct
Public Structure SnapshotPoint
Implements IComparable(Of SnapshotPoint)
Inheritance
SnapshotPoint
Implements

Constructors

SnapshotPoint(ITextSnapshot, Int32)

Initializes a new instance of a SnapshotPoint with respect to a particular snapshot and position.

Properties

Position

Gets the position of the point.

Snapshot

Gets the ITextSnapshot to which this snapshot point refers.

Methods

Add(Int32)

Creates a new snapshot point at the specified offset from this point.

CompareTo(SnapshotPoint)

Determines whether this snapshot is the same as a second snapshot point.

Difference(SnapshotPoint)

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

Equals(Object)

Determines whether this snapshot point is the same as a second snapshot point.

GetChar()

Gets the character at the position of this snapshot point.

GetContainingLine()

The ITextSnapshotLine containing this snapshot point.

GetContainingLineNumber()

Gets the number of the line that contains this snapshot point.

GetHashCode()

Serves as a hash function for this type.

Subtract(Int32)

Creates a new snapshot point at the specified negative offset from this point.

ToString()

Converts this snapshot point to a string, or to the string "uninit" if the ITextSnapshot is null.

TranslateTo(ITextSnapshot, PointTrackingMode)

Translates this snapshot Point to a different snapshot of the same ITextBuffer.

Operators

Addition(SnapshotPoint, Int32)

Increments the position of a snapshot point.

Equality(SnapshotPoint, SnapshotPoint)

Determines whether this snapshot point is the same as a second snapshot point.

GreaterThan(SnapshotPoint, SnapshotPoint)

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(SnapshotPoint, SnapshotPoint)

Determines whether this snapshot point is different from a second snapshot point.

LessThan(SnapshotPoint, SnapshotPoint)

Determine if the position of the left point is less than the position of the right point.

Subtraction(SnapshotPoint, Int32)

Decrements the position of a snapshot point.

Subtraction(SnapshotPoint, SnapshotPoint)

Computes the offset between two SnapshotPoint objects.

Applies to