Returns the index within the collection of the specified item.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
- Type: System.Object
An object representing the item to locate in the collection.
Return ValueType: System.Int32
The zero-based index where the item is located within the collection; otherwise, negative one (-1).
The method enables you to determine where an item is located within the collection. To determine whether an item is located within the collection before calling this method, use the Contains method.