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
- position
Type: Microsoft.VisualStudio.Text.SnapshotPoint
The position of the virtual snapshot point.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.