共用方式為


Span.FromBounds 方法

使用指定的起始和結束位置初始化 Span 的新執行個體。

命名空間:  Microsoft.VisualStudio.Text
組件:  Microsoft.VisualStudio.Text.Data (在 Microsoft.VisualStudio.Text.Data.dll 中)

語法

'宣告
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

參數

  • start
    類型:Int32

    新延伸的起始位置。

  • end
    類型:Int32

    新延伸的結束位置。

傳回值

類型:Microsoft.VisualStudio.Text.Span
新的延伸。

例外狀況

例外狀況 條件
ArgumentOutOfRangeException

start小於零,或end是小於start。

.NET Framework 安全性

請參閱

參考

Span 結構

Microsoft.VisualStudio.Text 命名空間