CircularListTIndexOf(T) Method

Determines the index of a specific item in the CircularListT.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public int IndexOf(
	T item
)

Parameters

item  T
The object to locate in the CircularListT.

Return Value

Int32
The index of item if found in the list; otherwise, -1.

Implements

IListTIndexOf(T)

Remarks

The list is searched forward starting at the first element and ending at the last element.

Only in .NET Framework, this method determines equality using the EnumComparer<TEnum>.Comparer when T is an enum type. Otherwise, the default equality comparer EqualityComparer<T>.Default will be used.

This method performs a linear search; therefore, this method is an O(n) operation.

See Also