MemoryExtensions.IndexOfAnyExceptInRange 方法

定義

多載

IndexOfAnyExceptInRange<T>(Span<T>, T, T)

在 和 highInclusive 之間 lowInclusive 搜尋範圍以外的任何值的第一個索引。

IndexOfAnyExceptInRange<T>(ReadOnlySpan<T>, T, T)

在 和 highInclusive 之間 lowInclusive 搜尋範圍以外的任何值的第一個索引。

IndexOfAnyExceptInRange<T>(Span<T>, T, T)

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

在 和 highInclusive 之間 lowInclusive 搜尋範圍以外的任何值的第一個索引。

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

類型參數

T

範圍和值的型別。

參數

span
Span<T>

要搜尋的範圍。

lowInclusive
T

排除範圍的下限,包含。

highInclusive
T

排除範圍的上限,包含。

傳回

超出指定範圍之任何值之第一次出現範圍中的索引。 如果所有值都位於指定的範圍內,則會傳回 -1。

適用於

IndexOfAnyExceptInRange<T>(ReadOnlySpan<T>, T, T)

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

在 和 highInclusive 之間 lowInclusive 搜尋範圍以外的任何值的第一個索引。

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

類型參數

T

範圍和值的型別。

參數

span
ReadOnlySpan<T>

要搜尋的範圍。

lowInclusive
T

排除範圍的下限,包含。

highInclusive
T

排除範圍的上限,包含。

傳回

超出指定範圍之任何值之第一次出現範圍中的索引。 如果所有值都位於指定的範圍內,則會傳回 -1。

適用於