Compartilhar via


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

  • length
    Type: Int32

    The 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

See Also

Reference

SnapshotSpan Structure

SnapshotSpan Overload

Microsoft.VisualStudio.Text Namespace