Share via


Span.FromBounds Method

Initializes a new instance of a Span with the given start and end positions.

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

Syntax

'Declaration
Public Shared Function FromBounds ( _
    start As Integer, _
    end As Integer _
) As Span
public static Span FromBounds(
    int start,
    int end
)
public:
static Span FromBounds(
    int start, 
    int end
)
static member FromBounds : 
        start:int * 
        end:int -> Span
public static function FromBounds(
    start : int, 
    end : int
) : Span

Parameters

  • start
    Type: Int32

    The start position of the new span.

  • end
    Type: Int32

    The end position of the new Span.

Return Value

Type: Microsoft.VisualStudio.Text.Span
The new span.

Exceptions

Exception Condition
ArgumentOutOfRangeException

start is less than zero, or end is less than start.

.NET Framework Security

See Also

Reference

Span Structure

Microsoft.VisualStudio.Text Namespace