NDepend.API Documentation
IndexOf<T> Method
NDepend.Helpers Namespace > ExtensionMethodsEnumerable Class : IndexOf<T> Method
The type parameter of the items in the read-only list.
The object to locate in readOnlyList.
Determines the index of a specific item in readOnlyList.
Syntax
[Extension()]
public static int IndexOf<T>( 
   IReadOnlyList<T> readOnlyList,
   T value
)

Parameters

readOnlyList
value
The object to locate in readOnlyList.

Type Parameters

T
The type parameter of the items in the read-only list.

Return Value

The index of value if found in the list; otherwise, -1.
Remarks
This method uses the EqualityComparer$lt;T>.Default.Equals() method on value to determine whether item exists
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsEnumerable Class
ExtensionMethodsEnumerable Members