Partager via


Span Constructor

Initializes a new instance of a Span with the given start point and length.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaration
Public Sub New ( _
    start As Integer, _
    length As Integer _
)
public Span(
    int start,
    int length
)
public:
Span(
    int start, 
    int length
)
new : 
        start:int * 
        length:int -> Span
public function Span(
    start : int, 
    length : int
)

Parameters

  • start
    Type: Int32

    The starting point of the span.

  • length
    Type: Int32

    The length of the span.

Exceptions

Exception Condition
ArgumentOutOfRangeException

start or length is less than zero, or (start + length) is greater than the length of the text snapshot.

.NET Framework Security

See Also

Reference

Span Structure

Microsoft.VisualStudio.Text Namespace