CollectionTIndexOf Method |
Searches for the specified object and returns the zero-based index of the first occurrence within the entire
CollectionT.
Namespace: System.Collections.ObjectModelAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public int IndexOf(
T item
)
Parameters
- item
- Type: T
The object to locate in the ListT. The value can be null for reference types.
Return Value
Type:
Int32The zero-based index of the first occurrence of
item within the entire
CollectionT, if found; otherwise, -1.
Implements
IListTIndexOf(T)See Also