Memory<T>.Slice 方法

定義

多載

Slice(Int32)

從起始於指定索引的目前記憶體形成配量。

Slice(Int32, Int32)

從起始於指定索引之指定長度的目前記憶體形成配量。

Slice(Int32)

從起始於指定索引的目前記憶體形成配量。

public:
 Memory<T> Slice(int start);
public Memory<T> Slice (int start);
member this.Slice : int -> Memory<'T>
Public Function Slice (start As Integer) As Memory(Of T)

參數

start
Int32

要開始配量的索引。

傳回

包含目前執行個體所有元素的物件,從 start 到執行個體結尾。

例外狀況

start 小於零或大於 Length

適用於

Slice(Int32, Int32)

從起始於指定索引之指定長度的目前記憶體形成配量。

public:
 Memory<T> Slice(int start, int length);
public Memory<T> Slice (int start, int length);
member this.Slice : int * int -> Memory<'T>
Public Function Slice (start As Integer, length As Integer) As Memory(Of T)

參數

start
Int32

要開始配量的索引。

length
Int32

配量中要包含的元素數目。

傳回

從目前執行個體的 start 起始,包含 length 元素的物件。

例外狀況

start 小於零或大於 Length

-或-

length 大於 Length - start

適用於