Finds the index of the first element satisfying some predicate.
If this sequence represents an infinite set or series and no element satisfies the predicate, this will never return!
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax public int IndexWhere(
Func<T, bool> predicate
)
public int IndexWhere(
Func<T, bool> predicate
)
Public Function IndexWhere (
predicate As Func(Of T, Boolean)
) As Integer
Public Function IndexWhere (
predicate As Func(Of T, Boolean)
) As Integer
public:
virtual int IndexWhere(
Func<T, bool>^ predicate
) sealed
public:
virtual int IndexWhere(
Func<T, bool>^ predicate
) sealed
abstract IndexWhere :
predicate : Func<'T, bool> -> int
override IndexWhere :
predicate : Func<'T, bool> -> int
abstract IndexWhere :
predicate : Func<'T, bool> -> int
override IndexWhere :
predicate : Func<'T, bool> -> int
Parameters
- predicate
- Type: System Func T, Boolean
The predicate used to test elements.
Return Value
Type:
Int32The index of the first element that satisfies the predicate, or -1 if none exists.
Implements
ISequence T IndexWhere(Func T, Boolean )See Also