Table of Contents

Method IndexOf

Namespace
Alternet.Common
Assembly
Alternet.Common.v9.dll

IndexOf<T>(IEnumerable<T>, T)

Finds the index of the first occurrence of an item in an enumerable.

public static int IndexOf<T>(this IEnumerable<T> items, T item)

Parameters

items IEnumerable<T>

The enumerable to search.

item T

The item to find.

Returns

int

The index of the first matching item, or -1 if the item was not found.

Type Parameters

T