A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.readonlyspan-1.slice below:

ReadOnlySpan<T>.Slice Method (System) | Microsoft Learn

ReadOnlySpan<T>.Slice Method Definition Overloads Slice(Int32)

Forms a slice out of the current read-only span that begins at a specified index.

Slice(Int32, Int32)

Forms a slice out of the current read-only span starting at a specified index for a specified length.

Slice(Int32)
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs

Forms a slice out of the current read-only span that begins at a specified index.

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

The zero-based index at which to begin the slice.

Returns

A span that consists of all elements of the current span from start to the end of the span.

Exceptions

start is greater than the number of items in the read-only span.

Slice(Int32, Int32)
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs
Source:
ReadOnlySpan.cs

Forms a slice out of the current read-only span starting at a specified index for a specified length.

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

The zero-based index at which to begin this slice.

length
Int32

The desired length for the slice.

Returns

A read-only span that consists of length elements from the current span starting at start.

Exceptions

start is less than zero or greater than Length.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4