共用方式為


MemoryExtensions.ContainsAnyInRange 方法

定義

多載

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

搜尋介於 lowInclusivehighInclusive之間範圍中的任何值,包括 。

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

lowInclusivehighInclusive之間搜尋任何值,如果找到,則會傳回 true。 如果找不到,則會傳回 false

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

來源:
MemoryExtensions.cs
來源:
MemoryExtensions.cs

搜尋介於 lowInclusivehighInclusive之間範圍中的任何值,包括 。

public:
generic <typename T>
 where T : IComparable<T>[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyInRange(ReadOnlySpan<T> span, T lowInclusive, T highInclusive);
public static bool ContainsAnyInRange<T> (this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
static member ContainsAnyInRange : ReadOnlySpan<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> bool (requires 'T :> IComparable<'T>)
<Extension()>
Public Function ContainsAnyInRange(Of T As IComparable(Of T)) (span As ReadOnlySpan(Of T), lowInclusive As T, highInclusive As T) As Boolean

類型參數

T

參數

span
ReadOnlySpan<T>

要搜尋的範圍。

lowInclusive
T

要搜尋的範圍下限,包含範圍。

highInclusive
T

要搜尋之範圍的上限,包含此範圍。

傳回

找到時 true。 如果找不到,則會傳回 false

適用於

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

來源:
MemoryExtensions.cs
來源:
MemoryExtensions.cs

lowInclusivehighInclusive之間搜尋任何值,如果找到,則會傳回 true。 如果找不到,則會傳回 false

public:
generic <typename T>
 where T : IComparable<T>[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyInRange(Span<T> span, T lowInclusive, T highInclusive);
public static bool ContainsAnyInRange<T> (this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>;
static member ContainsAnyInRange : Span<'T (requires 'T :> IComparable<'T>)> * 'T * 'T -> bool (requires 'T :> IComparable<'T>)
<Extension()>
Public Function ContainsAnyInRange(Of T As IComparable(Of T)) (span As Span(Of T), lowInclusive As T, highInclusive As T) As Boolean

類型參數

T

參數

span
Span<T>

要搜尋的範圍。

lowInclusive
T

要搜尋的範圍下限,包含範圍。

highInclusive
T

要搜尋之範圍的上限,包含此範圍。

傳回

找到時 true。 如果找不到,則會傳回 false

適用於