ImmutableList::LastIndexOf<T> Method (IImmutableList<T>^, T, Int32, Int32)
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
public: generic<typename T> [ExtensionAttribute] static int LastIndexOf( IImmutableList<T>^ list, T item, int startIndex, int count )
Parameters
- list
-
Type:
System.Collections.Immutable::IImmutableList<T>^
The list to search.
- item
-
Type:
T
The object to locate in the Immutable list. The value can be null for reference types.
- startIndex
-
Type:
System::Int32
The zero-based starting index of the backward search.
- count
-
Type:
System::Int32
The number of elements in the section to search.
Return Value
Type: System::Int32The zero-based index of the last occurrence of item within the range of elements in the Immutable list that extends from the first element to index, if found; otherwise, –1.
Type Parameters
- T
The type of items in the list.
Show: