SpanExtensions.Count<T>(Span<T>, T) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- value
- T
The T
value to look for.
Returns
The number of occurrences of value
in span
.