Compartir a través de


VirtualSnapshotPoint Constructor (SnapshotPoint, Int32)

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

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

Syntax

'Declaración
Public Sub New ( _
    position As SnapshotPoint, _
    virtualSpaces As Integer _
)
public VirtualSnapshotPoint(
    SnapshotPoint position,
    int virtualSpaces
)
public:
VirtualSnapshotPoint(
    SnapshotPoint position, 
    int virtualSpaces
)
new : 
        position:SnapshotPoint * 
        virtualSpaces:int -> VirtualSnapshotPoint
public function VirtualSnapshotPoint(
    position : SnapshotPoint, 
    virtualSpaces : int
)

Parameters

  • virtualSpaces
    Type: System.Int32
    The number of virtual spaces after position.

Exceptions

Exception Condition
ArgumentOutOfRangeException

virtualSpaces is negative, or the position plus the number of virtual spaces is less than the position.

ArgumentException

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

Remarks

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

.NET Framework Security

See Also

Reference

VirtualSnapshotPoint Structure

VirtualSnapshotPoint Overload

Microsoft.VisualStudio.Text Namespace