Partager via


VirtualSnapshotPoint Constructors

Definition

Overloads

VirtualSnapshotPoint(SnapshotPoint)

Initializes a new instance of a VirtualSnapshotPoint at position, with zero virtual spaces.

VirtualSnapshotPoint(ITextSnapshot, Int32)

Initializes a new instance of a VirtualSnapshotPoint at position in a snapshot, with zero virtual spaces.

VirtualSnapshotPoint(ITextSnapshotLine, Int32)

Initializes a new instance of a VirtualSnapshotPoint at offset of line, placing the point in virtual space if necessary.

VirtualSnapshotPoint(SnapshotPoint, Int32)

Initializes a new instance of a VirtualSnapshotPoint at position, with the specified number of virtual spaces.

VirtualSnapshotPoint(SnapshotPoint)

Initializes a new instance of a VirtualSnapshotPoint at position, with zero virtual spaces.

public:
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::SnapshotPoint position);
public VirtualSnapshotPoint (Microsoft.VisualStudio.Text.SnapshotPoint position);
new Microsoft.VisualStudio.Text.VirtualSnapshotPoint : Microsoft.VisualStudio.Text.SnapshotPoint -> Microsoft.VisualStudio.Text.VirtualSnapshotPoint
Public Sub New (position As SnapshotPoint)

Parameters

position
SnapshotPoint

The position the point in the snapshot.

Applies to

VirtualSnapshotPoint(ITextSnapshot, Int32)

Initializes a new instance of a VirtualSnapshotPoint at position in a snapshot, with zero virtual spaces.

public:
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, int position);
public:
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, int position);
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::ITextSnapshot const & snapshot, int position);
public VirtualSnapshotPoint (Microsoft.VisualStudio.Text.ITextSnapshot snapshot, int position);
new Microsoft.VisualStudio.Text.VirtualSnapshotPoint : Microsoft.VisualStudio.Text.ITextSnapshot * int -> Microsoft.VisualStudio.Text.VirtualSnapshotPoint
Public Sub New (snapshot As ITextSnapshot, position As Integer)

Parameters

snapshot
ITextSnapshot

The snapshot to use.

position
Int32

The position of the snapshot point.

Applies to

VirtualSnapshotPoint(ITextSnapshotLine, Int32)

Initializes a new instance of a VirtualSnapshotPoint at offset of line, placing the point in virtual space if necessary.

public:
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::ITextSnapshotLine ^ line, int offset);
public:
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::ITextSnapshotLine ^ line, int offset);
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::ITextSnapshotLine const & line, int offset);
public VirtualSnapshotPoint (Microsoft.VisualStudio.Text.ITextSnapshotLine line, int offset);
new Microsoft.VisualStudio.Text.VirtualSnapshotPoint : Microsoft.VisualStudio.Text.ITextSnapshotLine * int -> Microsoft.VisualStudio.Text.VirtualSnapshotPoint
Public Sub New (line As ITextSnapshotLine, offset As Integer)

Parameters

line
ITextSnapshotLine

The line on which to place the point.

offset
Int32

The offset (zero-based) of the point.

Exceptions

line is null.

offset is negative.

Remarks

offset is a character offset from the start of the line. It does not correspond to a column position (for example, if the line consists of a single tab and the offset is 2, then the resulting VirtualSnapshotPoint will be one "space" past the end of the line).

Applies to

VirtualSnapshotPoint(SnapshotPoint, Int32)

Initializes a new instance of a VirtualSnapshotPoint at position, with the specified number of virtual spaces.

public:
 VirtualSnapshotPoint(Microsoft::VisualStudio::Text::SnapshotPoint position, int virtualSpaces);
public VirtualSnapshotPoint (Microsoft.VisualStudio.Text.SnapshotPoint position, int virtualSpaces);
new Microsoft.VisualStudio.Text.VirtualSnapshotPoint : Microsoft.VisualStudio.Text.SnapshotPoint * int -> Microsoft.VisualStudio.Text.VirtualSnapshotPoint
Public Sub New (position As SnapshotPoint, virtualSpaces As Integer)

Parameters

position
SnapshotPoint

The position of the virtual snapshot point.

virtualSpaces
Int32

The number of virtual spaces after position.

Exceptions

virtualSpaces is not zero and the position does not correspond to the end of the line.

virtualSpaces is negative.

Remarks

virtualSpaces must be zero unless position corresponds to a location at the end of a ITextSnapshotLine.

Applies to