Finds index of last occurrence of some value in this list before or at a given end index.
Namespace: FlinqAssembly: Flinq (in Flinq.dll) Version: 1.0.2.0 (1.0.2.0)
Syntax
C# |
---|
public static int LastIndexOf<A>( this IEnumerable<A> source, A elem, int end, IEqualityComparer<A> comparer ) |
Parameters
- source
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'A>)>)>
The input sequence.
- elem
- Type: A
The element value to search for.
- end
- Type: System..::..Int32
The end index.
- comparer
- Type: System.Collections.Generic..::..IEqualityComparer<(Of <(<'A>)>)>
An IEqualityComparer<A> to use to compare elements. If comparer is null, the default equality comparer, EqualityComparer<A>.Default, is used to compare elements.
Type Parameters
- A
- The type of the elements in the input sequence.
Return Value
Type: Int32The index <= end of the last element of this list that is equal (as determined by comparer) to elem, or -1, if none exists.