Modifica

Condividi tramite


SpanExtensions.Count<T>(Span<T>, T) Method

Definition

Counts the number of occurrences of a given value into a target Span<T> instance.

public static int Count<T> (this Span<T> span, T value) where T : IEquatable<T>;
static member Count : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> int (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function Count(Of T As IEquatable(Of T)) (span As Span(Of T), value As T) As Integer

Type Parameters

T

The type of items in the input Span<T> instance.

Parameters

span
Span<T>

The input Span<T> instance to read.

value
T

The T value to look for.

Returns

The number of occurrences of value in span.

Applies to