VirtualSnapshotPoint Constructor (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.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
Syntax
'Declaration
Public Sub New ( _
line As ITextSnapshotLine, _
offset As Integer _
)
public VirtualSnapshotPoint(
ITextSnapshotLine line,
int offset
)
public:
VirtualSnapshotPoint(
ITextSnapshotLine^ line,
int offset
)
new :
line:ITextSnapshotLine *
offset:int -> VirtualSnapshotPoint
public function VirtualSnapshotPoint(
line : ITextSnapshotLine,
offset : int
)
Parameters
- line
Type: Microsoft.VisualStudio.Text.ITextSnapshotLine
The line on which to place the point.
- offset
Type: System.Int32
The column (zero-based) of the point.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | line is nulla null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | column is negative, or the start position plus the column is less than the start position. |
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).
.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.