xtd 0.2.0
Loading...
Searching...
No Matches

◆ index_of()

template<typename type_t >
virtual xtd::size xtd::collections::generic::ilist< type_t >::index_of ( const type_t &  item) const
pure virtualnoexcept

Determines the index of a specific item in the xtd::collections::generic::ilist <type_t>.

Parameters
itemThe object to locate in the xtd::collections::generic::ilist <type_t>.
Returns
The index of item if found in the list; otherwise, xtd::collections::generic::ilist::npos.
Remarks
If an object occurs multiple times in the list, the xtd::collections::generic::ilist::index_of method always returns the first instance found.

Implemented in xtd::collections::object_model::read_only_collection< type_t >, xtd::basic_array< type_t, allocator_t >, xtd::basic_array< type_t, allocator_t >, and xtd::collections::generic::list< type_t, allocator_t >.