Share via


PnpObjectCollection.IndexOf(PnpObject, UInt32) Method

Definition

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.

public:
 virtual bool IndexOf(PnpObject ^ value, [Out] unsigned int & index) = IVectorView<PnpObject ^>::IndexOf;
bool IndexOf(PnpObject const& value, [Out] uint32_t & index);
public bool IndexOf(PnpObject value, out uint index);
Public Function IndexOf (value As PnpObject, ByRef index As UInteger) As Boolean

Parameters

value
PnpObject

The value to find in the collection.

index
UInt32

unsigned int

uint32_t

The index of the item to find, if found.

Returns

Boolean

bool

True if an item with the specified value was found; otherwise, False.

Implements

M:Windows.Foundation.Collections.IVectorView1.IndexOf(0,System.UInt32@) M:Windows.Foundation.Collections.IVectorView1.IndexOf(0,unsigned int@) M:Windows.Foundation.Collections.IVectorView1.IndexOf(0,uint32_t@)

Applies to