Share via


SnapshotSpan Constructor (SnapshotPoint, SnapshotPoint)

Initializes a new instance of a SnapshotSpan from two SnapshotPoint objects.

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

Syntax

'Declaration
Public Sub New ( _
    start As SnapshotPoint, _
    end As SnapshotPoint _
)
public SnapshotSpan(
    SnapshotPoint start,
    SnapshotPoint end
)
public:
SnapshotSpan(
    SnapshotPoint start, 
    SnapshotPoint end
)
new : 
        start:SnapshotPoint * 
        end:SnapshotPoint -> SnapshotSpan
public function SnapshotSpan(
    start : SnapshotPoint, 
    end : SnapshotPoint
)

Parameters

Exceptions

Exception Condition
ArgumentException

The snapshot points belong to different ITextSnapshot objects.

ArgumentOutOfRangeException

The end point comes before the start point.

.NET Framework Security

See Also

Reference

SnapshotSpan Structure

SnapshotSpan Overload

Microsoft.VisualStudio.Text Namespace