IndexOf Method

SynchronizedCollection<T>.IndexOf Method (T)


Returns the index of the first occurrence of a value in the collection.

Namespace:   System.Collections.Generic
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public int IndexOf(
	T item


Type: T

Removes all items from the collection.

Return Value

Type: System.Int32

The zero-based index of the first occurrence of the value in the collection.

Exception Condition

The value set is null or is not of the correct generic type T for the collection.

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft