DnssdServiceInstanceCollection.IndexOf(DnssdServiceInstance, UInt32) 方法

定义

获取一个值,该值指示给定 的 DnssdServiceInstance 是否位于此服务实例集合中的指定索引处。

注意

不支持 DnssdServiceInstanceCollection,将来可能会更改或不可用。 请改用 Windows.Devices.Enumeration API。

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

参数

value
DnssdServiceInstance

要获取其索引的 DnssdServiceInstance

index
UInt32

unsigned int

uint32_t

索引(如果找到 DnssdServiceInstance )。

返回

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

适用于