MemoryExtensions.ContainsAnyInRange Method

Definition

Overloads

ContainsAnyInRange<T>(ReadOnlySpan<T>, T, T)

Searches for any value in the range between lowInclusive and highInclusive, inclusive.

ContainsAnyInRange<T>(Span<T>, T, T)

Searches for any value in the range between lowInclusive and highInclusive, inclusive, and returns true if found. If not found, returns false.

ContainsAnyInRange<T>(ReadOnlySpan<T>, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for any value in the range between lowInclusive and highInclusive, inclusive.

public static bool ContainsAnyInRange<T> (this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;

Type Parameters

T

Parameters

span
ReadOnlySpan<T>

The span to search.

lowInclusive
T

The lower bound, inclusive, of the range for which to search.

highInclusive
T

The upper bound, inclusive, of the range for which to search.

Returns

true if found. If not found, returns false.

Applies to

.NET 9 and .NET 8
Product Versions
.NET 8, 9

ContainsAnyInRange<T>(Span<T>, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for any value in the range between lowInclusive and highInclusive, inclusive, and returns true if found. If not found, returns false.

public static bool ContainsAnyInRange<T> (this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;

Type Parameters

T

Parameters

span
Span<T>

The span to search.

lowInclusive
T

The lower bound, inclusive, of the range for which to search.

highInclusive
T

The upper bound, inclusive, of the range for which to search.

Returns

true if found. If not found, returns false.

Applies to

.NET 9 and .NET 8
Product Versions
.NET 8, 9