-api-id | -api-type |
---|---|
M:Windows.Devices.Enumeration.Pnp.PnpObjectCollection.IndexOf(Windows.Devices.Enumeration.Pnp.PnpObject,System.UInt32@) |
winrt method |
Important
We no longer recommend that you use the types in the Windows.Devices.Enumeration.Pnp namespace. Instead, the types in the Windows.Devices.Enumeration namespace implement a modern, and better maintained, superset of the functionality of Windows.Devices.Enumeration.Pnp.
The alternative to PnpObjectType is the Windows.Devices.Enumeration.DeviceInformationKind enum, which you can pass as a parameter to Windows.Devices.Enumeration APIs. For example, instead of using PnpObjectType when you create a PnpObjectWatcher, use DeviceInformationKind when you create a DeviceWatcher.
Retrieves the index of the specified item.
The value to find in the collection.
The index of the item to find, if found.
True if an item with the specified value was found; otherwise, False.