ReadOnlyMemory<T>.Slice ReadOnlyMemory<T>.Slice ReadOnlyMemory<T>.Slice ReadOnlyMemory<T>.Slice Method

Definition

Overloads

Slice(Index) Slice(Index) Slice(Index) Slice(Index)
Slice(Int32) Slice(Int32) Slice(Int32) Slice(Int32)

Forms a slice out of the given memory region, beginning at a specified poisition and continuing to its end.

Slice(Range) Slice(Range) Slice(Range)

Forms a slice from a range of the current instance.

Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32)

Forms a slice out of the given memory region starting at start position for length elements.

Slice(Index) Slice(Index) Slice(Index) Slice(Index)

public:
 ReadOnlyMemory<T> Slice(Index startIndex);
public ReadOnlyMemory<T> Slice (Index startIndex);
member this.Slice : Index -> ReadOnlyMemory<'T>
Public Function Slice (startIndex As Index) As ReadOnlyMemory(Of T)

Parameters

startIndex
Index Index Index Index

Returns

Slice(Int32) Slice(Int32) Slice(Int32) Slice(Int32)

Forms a slice out of the given memory region, beginning at a specified poisition and continuing to its end.

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)

Parameters

start
Int32 Int32 Int32 Int32

The index at which to begin this slice.

Returns

A read-only memory region representing the desired slice.

Exceptions

Slice(Range) Slice(Range) Slice(Range)

Forms a slice from a range of the current instance.

public:
 ReadOnlyMemory<T> Slice(Range range);
public ReadOnlyMemory<T> Slice (Range range);
member this.Slice : Range -> ReadOnlyMemory<'T>

Parameters

range
Range Range Range Range

The range of elements from the current memory region to include in the slice.

Returns

A read-only memory region representing the desired slice.

Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32)

Forms a slice out of the given memory region starting at start position for length elements.

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)

Parameters

start
Int32 Int32 Int32 Int32

The index at which to begin this slice.

length
Int32 Int32 Int32 Int32

The desired length for the slice.

Returns

A read-only memory region representing the desired slice.

Exceptions

start, length, or start + length are outside the range of the current instance.

Applies to