ListExt.IndexOf<T> Method
Gets the index of a given item in a list.
Namespace: UltimateXR.Extensions.System.Collections
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static int IndexOf<T>(
this IReadOnlyList<T> self,
T item
)
Parameters
- self
- Type: System.Collections.Generic.IReadOnlyList<T>
List where to look for the item - item
- Type: T
Item to look for
Type Parameters
- T
- Element type
Return Value
Type: Int32
Element index or -1 if not found
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IReadOnlyList<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
Equals() is used for comparison
See Also
Reference
ListExt Class
UltimateXR.Extensions.System.Collections Namespace