SnapshotSpan Constructor (ITextSnapshot, Int32, Int32)
Initializes a new instance of a SnapshotSpan with the specified snapshot, start point, and length.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Déclaration
Public Sub New ( _
snapshot As ITextSnapshot, _
start As Integer, _
length As Integer _
)
public SnapshotSpan(
ITextSnapshot snapshot,
int start,
int length
)
public:
SnapshotSpan(
ITextSnapshot^ snapshot,
int start,
int length
)
new :
snapshot:ITextSnapshot *
start:int *
length:int -> SnapshotSpan
public function SnapshotSpan(
snapshot : ITextSnapshot,
start : int,
length : int
)
Parameters
- snapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshot
The text snapshot on which to base the snapshot span.
- start
Type: System.Int32
The starting point of the snapshot span.
- length
Type: System.Int32
The length of the snapshot span.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | snapshot is nulla null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | start is negative or greater than snapshot.Length, or length is negative, or start + length is greater than snapshot.Length. |
.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.