SnapshotSpan Constructor (SnapshotPoint, Int32)
Initializes a new instance of a SnapshotSpan from an existing SnapshotPoint and a specified length.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Public Sub New ( _
start As SnapshotPoint, _
length As Integer _
)
public SnapshotSpan(
SnapshotPoint start,
int length
)
public:
SnapshotSpan(
SnapshotPoint start,
int length
)
new :
start:SnapshotPoint *
length:int -> SnapshotSpan
public function SnapshotSpan(
start : SnapshotPoint,
length : int
)
Parameters
start
Type: Microsoft.VisualStudio.Text.SnapshotPointThe starting snapshot point.
length
Type: Int32The length of the span.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | length is negative, or start + length is greater than the length of the snapshot. |
.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.