Share via


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

  • 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

See Also

Reference

VirtualSnapshotPoint Structure

VirtualSnapshotPoint Overload

Microsoft.VisualStudio.Text Namespace