Compartilhar via


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

'Declaração
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

Exceptions

Exception Condition
ArgumentNullException

snapshot is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

span.End is greater than snapshot.Length.

.NET Framework Security

See Also

Reference

SnapshotSpan Structure

SnapshotSpan Overload

Microsoft.VisualStudio.Text Namespace