次の方法で共有


PnpObjectCollection.IndexOf(PnpObject, UInt32) メソッド

定義

重要

Windows.Devices.Enumeration.Pnp 名前空間で型を使用することはお勧めしません。 代わりに、Windows.Devices.Enumeration 名前空間の型は、Windows.Devices.Enumeration.Pnp の機能の最新の、より適切に保守されたスーパーセットを実装します。

PnpObjectType の代わりに、Windows.Devices.Enumeration.DeviceInformationKind 列挙型があり、パラメーターとして Windows.Devices.Enumeration API に渡すことができます。 たとえば、PnpObjectWatcher を作成するときに PnpObjectType を使用する代わりに、DeviceWatcher を作成するときに DeviceInformationKind を使用します。

指定した項目のインデックスを取得します。

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

パラメーター

value
PnpObject

コレクション内で検索する値。

index
UInt32

unsigned int

uint32_t

検索する項目のインデックス (見つかった場合)。

戻り値

Boolean

bool

True を指定した値を持つ項目が見つかった場合。それ以外の場合は False。

実装

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@)

適用対象