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
'Declaración
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
- start
Type: Microsoft.VisualStudio.Text.SnapshotPoint
The start point.
- end
Type: Microsoft.VisualStudio.Text.SnapshotPoint
The end point, which must be from the same ITextSnapshot as the start point.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The snapshot points belong to different ITextSnapshot objects. |
ArgumentOutOfRangeException | The end point comes before the start point. |
.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.