ImmutableList::IndexOf<T> Method (IImmutableList<T>^, T)

 

Searches for the specified object and returns the zero-based index of the first occurrence within the list.

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public:
generic<typename T>
[ExtensionAttribute]
static int IndexOf(
	IImmutableList<T>^ list,
	T item
)

Parameters

list
Type: System.Collections.Immutable::IImmutableList<T>^

The list to search.

item
Type: T

The object to locate in the list. The value can be null for reference types.

Return Value

Type: System::Int32

The zero-based index of the first occurrence of item within the range of elements in the list that extends from index to the last element, if found; otherwise, –1.

Type Parameters

T

The type of items in the list.

Return to top
Show: