Click or drag to resize

ListExtensionsIndexOfT Method

Gets the index of an item in a enumeration or list.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static int IndexOf<T>(
	this IEnumerable<T> list,
	T searchedItem
)

Parameters

list  IEnumerableT
The item list.
searchedItem  T
The searched item.

Type Parameters

T
Type of the item to search for.

Return Value

Int32
Index of the first occurence of the searched item in the list (0 for the first item). If the item is not found in the list, a negative value is returned.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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).
See Also