Share via


ConfigurationElementCollectionBase<T>.IndexOf(T) Method

Definition

Determines the index of an element in the collection.

public:
 int IndexOf(T element);
public int IndexOf (T element);
member this.IndexOf : 'T -> int
Public Function IndexOf (element As T) As Integer

Parameters

element
T

The element to locate in the collection.

Returns

The index of the element, if it is in the collection; otherwise, -1.

Remarks

If an element occurs multiple times in the collection, the IndexOf method always returns the first instance found.

Applies to