ReadOnlySequence<T>.Slice Method

Definition

Overloads

Slice(Int64)

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified index and continuing to the end of the read-only sequence.

Slice(SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified sequence position and continuing to the end of the read-only sequence.

Slice(Int32, Int32)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(Int32, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(Int64, Int64)

Forms a slice out of the given ReadOnlySequence<T>, beginning at start, with length items.

Slice(Int64, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(SequencePosition, Int32)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(SequencePosition, Int64)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(SequencePosition, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(Int64)

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified index and continuing to the end of the read-only sequence.

public:
 System::Buffers::ReadOnlySequence<T> Slice(long start);
public System.Buffers.ReadOnlySequence<T> Slice (long start);
member this.Slice : int64 -> System.Buffers.ReadOnlySequence<'T>
Public Function Slice (start As Long) As ReadOnlySequence(Of T)

Parameters

start
Int64

The start index at which to begin this slice.

Returns

A slice starting at index start and continuing to the end of the current read-only sequence.

Slice(SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified sequence position and continuing to the end of the read-only sequence.

public:
 System::Buffers::ReadOnlySequence<T> Slice(SequencePosition start);
public System.Buffers.ReadOnlySequence<T> Slice (SequencePosition start);
member this.Slice : SequencePosition -> System.Buffers.ReadOnlySequence<'T>
Public Function Slice (start As SequencePosition) As ReadOnlySequence(Of T)

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

Returns

A slice starting at sequence position start and continuing to the end of the current read-only sequence.

Slice(Int32, Int32)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

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

Parameters

start
Int32

The index at which to begin this slice.

length
Int32

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at index start.

Slice(Int32, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

public:
 System::Buffers::ReadOnlySequence<T> Slice(int start, SequencePosition end);
public System.Buffers.ReadOnlySequence<T> Slice (int start, SequencePosition end);
member this.Slice : int * SequencePosition -> System.Buffers.ReadOnlySequence<'T>
Public Function Slice (start As Integer, end As SequencePosition) As ReadOnlySequence(Of T)

Parameters

start
Int32

The index at which to begin this slice.

end
SequencePosition

The end (exclusive) SequencePosition of the slice.

Returns

A slice that consists of items from the start index to, but not including, the end sequence position in the current read-only sequence.

Slice(Int64, Int64)

Forms a slice out of the given ReadOnlySequence<T>, beginning at start, with length items.

public:
 System::Buffers::ReadOnlySequence<T> Slice(long start, long length);
public System.Buffers.ReadOnlySequence<T> Slice (long start, long length);
member this.Slice : int64 * int64 -> System.Buffers.ReadOnlySequence<'T>
Public Function Slice (start As Long, length As Long) As ReadOnlySequence(Of T)

Parameters

start
Int64

The index at which to begin this slice.

length
Int64

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at index start.

Slice(Int64, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

public:
 System::Buffers::ReadOnlySequence<T> Slice(long start, SequencePosition end);
public System.Buffers.ReadOnlySequence<T> Slice (long start, SequencePosition end);
member this.Slice : int64 * SequencePosition -> System.Buffers.ReadOnlySequence<'T>
Public Function Slice (start As Long, end As SequencePosition) As ReadOnlySequence(Of T)

Parameters

start
Int64

The index at which to begin this slice.

end
SequencePosition

The end (exclusive) of the slice.

Returns

A slice that consists of items from the start index to, but not including, the end sequence position in the current read-only sequence.

Slice(SequencePosition, Int32)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

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

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

length
Int32

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at sequence position start.

Slice(SequencePosition, Int64)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

public:
 System::Buffers::ReadOnlySequence<T> Slice(SequencePosition start, long length);
public System.Buffers.ReadOnlySequence<T> Slice (SequencePosition start, long length);
member this.Slice : SequencePosition * int64 -> System.Buffers.ReadOnlySequence<'T>
Public Function Slice (start As SequencePosition, length As Long) As ReadOnlySequence(Of T)

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

length
Int64

The length of the slice.

Returns

A slice that consists of length elements from the current instance starting at sequence position start.

Slice(SequencePosition, SequencePosition)

Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

public:
 System::Buffers::ReadOnlySequence<T> Slice(SequencePosition start, SequencePosition end);
public System.Buffers.ReadOnlySequence<T> Slice (SequencePosition start, SequencePosition end);
member this.Slice : SequencePosition * SequencePosition -> System.Buffers.ReadOnlySequence<'T>
Public Function Slice (start As SequencePosition, end As SequencePosition) As ReadOnlySequence(Of T)

Parameters

start
SequencePosition

The starting (inclusive) SequencePosition at which to begin this slice.

end
SequencePosition

The ending (exclusive) SequencePosition of the slice.

Returns

A slice that consists of items from the start sequence position to, but not including, the end sequence position in the current read-only sequence.

Applies to