Memory<T>.Slice 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Slice(Int32) |
從當前記憶體中形成一個切片,從指定索引開始。 |
| Slice(Int32, Int32) |
從當前記憶體中形成一個切片,從指定索引開始,且長度指定。 |
Slice(Int32)
- 來源:
- Memory.cs
- 來源:
- Memory.cs
- 來源:
- Memory.cs
- 來源:
- Memory.cs
- 來源:
- Memory.cs
從當前記憶體中形成一個切片,從指定索引開始。
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)
- 來源:
- Memory.cs
- 來源:
- Memory.cs
- 來源:
- Memory.cs
- 來源:
- Memory.cs
- 來源:
- Memory.cs
從當前記憶體中形成一個切片,從指定索引開始,且長度指定。
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
切片中要包含的元素數量。
傳回
一個包含 length 當前實例元素的物件,從 開始 start。