共用方式為


VirtualSnapshotPoint Structure

Represents a SnapshotPoint that may have virtual spaces.

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

Syntax

'宣告
Public Structure VirtualSnapshotPoint _
    Implements IComparable(Of VirtualSnapshotPoint)
public struct VirtualSnapshotPoint : IComparable<VirtualSnapshotPoint>
public value class VirtualSnapshotPoint : IComparable<VirtualSnapshotPoint>
[<Sealed>]
type VirtualSnapshotPoint =  
    struct
        interface IComparable<VirtualSnapshotPoint>
    end
JScript supports the use of structures, but not the declaration of new ones.

The VirtualSnapshotPoint type exposes the following members.

Constructors

  Name Description
Public method VirtualSnapshotPoint(SnapshotPoint) Initializes a new instance of a VirtualSnapshotPoint at the specified position, with zero virtual spaces.
Public method VirtualSnapshotPoint(ITextSnapshot, Int32) Initializes a new instance of a VirtualSnapshotPoint at the specified position in the specified snapshot, with zero virtual spaces.
Public method VirtualSnapshotPoint(ITextSnapshotLine, Int32) Initializes a new instance of a VirtualSnapshotPoint at the specified offset of the specified line, placing the point in virtual space if necessary.
Public method VirtualSnapshotPoint(SnapshotPoint, Int32) Initializes a new instance of a VirtualSnapshotPoint at the specified position, with the specified number of virtual spaces.

Top

Properties

  Name Description
Public property IsInVirtualSpace Determines whether the snapshot point has virtual spaces.
Public property Position Gets the position of the snapshot point.
Public property VirtualSpaces Gets the number of virtual spaces.

Top

Methods

  Name Description
Public method CompareTo Compares one VirtualSnapshotPoint to another.
Public method Equals Determines whether two VirtualSnapshotPoint objects are the same. (Overrides ValueType.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Gets the hash code for the object. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Converts the object to a string. (Overrides ValueType.ToString().)
Public method TranslateTo(ITextSnapshot) Translates this point to the specified snapshot.
Public method TranslateTo(ITextSnapshot, PointTrackingMode) Translates this point to the specified text snapshot with the specified tracking mode.

Top

Operators

  Name Description
Public operatorStatic member Equality Determines whether two VirtualSnapshotPoint objects are the same.
Public operatorStatic member GreaterThan Determines whether the position of the left point is greater than the position of the right point.
Public operatorStatic member GreaterThanOrEqual Determines whether the position of the left point is greater than or equal to the position of the right point.
Public operatorStatic member Inequality Determines whether two VirtualSnapshotPoint objects are different.
Public operatorStatic member LessThan Determines whether the position of the left point is less than the position of the right point.
Public operatorStatic member LessThanOrEqual Determines whether the position of the left point is less than or equal to the position of the right point.

Top

Remarks

Virtual spaces are "extra" spaces at the end of a line that do not add to the length of the line. You can enable or disable virtual spaces in Visual Studio. When virtual spaces are disabled, pressing on the right arrow key at the end of a line causes the caret to move to the beginning of the next line. When virtual spaces are enabled, pressing on the right arrow key at the end of a line causes the caret to move forward on the same line.

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.

See Also

Reference

Microsoft.VisualStudio.Text Namespace