Share via


IBindableVector.IndexOf(Object, UInt32) 方法

定义

返回向量中指定项的索引。

public:
 bool IndexOf(Platform::Object ^ value, [Out] unsigned int & index);
bool IndexOf(IInspectable const& value, [Out] uint32_t & index);
public bool IndexOf(object value, out uint index);
Public Function IndexOf (value As Object, ByRef index As UInteger) As Boolean

参数

value
Object

Platform::Object

IInspectable

在向量中查找的项。

index
UInt32

unsigned int

uint32_t

如果找到项,则为从零开始的索引。 如果未找到该项,则返回 0,因此请务必检查返回值。

返回

Boolean

bool

如果找到该项,则为 true;如果找不到该项,则为 false

注解

使用 .NET 编程时,此接口是隐藏的,开发人员应使用 System.Collections.IList 接口。

适用于

另请参阅