SnapshotSpan Constructor (ITextSnapshot, Span)
Initializes a new instance of a SnapshotSpan with the specified snapshot and span.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaración
Public Sub New ( _
snapshot As ITextSnapshot, _
span As Span _
)
public SnapshotSpan(
ITextSnapshot snapshot,
Span span
)
public:
SnapshotSpan(
ITextSnapshot^ snapshot,
Span span
)
new :
snapshot:ITextSnapshot *
span:Span -> SnapshotSpan
public function SnapshotSpan(
snapshot : ITextSnapshot,
span : Span
)
Parameters
- snapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshot
The ITextSnapshot on which to base the snapshot span.
- span
Type: Microsoft.VisualStudio.Text.Span
The span of the snapshot span.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | snapshot is nulla null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | span.End 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.