Breyta

Deila með


Memory<T>.Slice Method

Definition

Overloads

Slice(Int32)

Forms a slice out of the current memory that begins at a specified index.

Slice(Int32, Int32)

Forms a slice out of the current memory starting at a specified index for a specified length.

Slice(Int32)

Source:
Memory.cs
Source:
Memory.cs
Source:
Memory.cs

Forms a slice out of the current memory that begins at a specified index.

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)

Parameters

start
Int32

The index at which to begin the slice.

Returns

An object that contains all elements of the current instance from start to the end of the instance.

Exceptions

start is less than zero or greater than Length.

Applies to

Slice(Int32, Int32)

Source:
Memory.cs
Source:
Memory.cs
Source:
Memory.cs

Forms a slice out of the current memory starting at a specified index for a specified length.

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)

Parameters

start
Int32

The index at which to begin the slice.

length
Int32

The number of elements to include in the slice.

Returns

An object that contains length elements from the current instance starting at start.

Exceptions

start is less than zero or greater than Length.

-or-

length is greater than Length - start

Applies to