ReadOnlyMemory<T>.Slice メソッド

定義

オーバーロード

Slice(Int32)

指定した位置から始まり、その最後まで続く、指定されたメモリ領域からスライスを形成します。

Slice(Int32, Int32)

length 要素の start 位置から開始して、指定されたメモリ領域からスライスを形成します。

Slice(Int32)

指定した位置から始まり、その最後まで続く、指定されたメモリ領域からスライスを形成します。

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

パラメーター

start
Int32

このスライスの開始位置を示すインデックス。

戻り値

ReadOnlyMemory<T>

目的のスライスを表している読み取り専用メモリ領域。

例外

start が 0 未満であるか、または Length を超えています。

適用対象

Slice(Int32, Int32)

length 要素の start 位置から開始して、指定されたメモリ領域からスライスを形成します。

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

パラメーター

start
Int32

このスライスの開始位置を示すインデックス。

length
Int32

スライスに求められる長さ。

戻り値

ReadOnlyMemory<T>

目的のスライスを表している読み取り専用メモリ領域。

例外

startlength、または start + length が現在のインスタンスの範囲外です。

適用対象