IVectorView<T>.IndexOf(T, UInt32) Method

Definition

Retrieves the index of a specified item in the vector view.

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

Parameters

value
T

The item to find in the vector view.

index
UInt32

unsigned int

uint32_t

If the item is found, this is the zero-based index of the item; otherwise, this parameter is 0.

Returns

Boolean

bool

true if the item is found; otherwise, false.

Remarks

When programming with .NET, this interface is hidden and developers should use the IReadOnlyList<T> interface.

If the underlying collection has changed, the view may throw an exception.

C++/WinRT If the underlying collection has changed, the view may throw a hresult_changed_state exception.

C++/CX If the underlying collection has changed, the view may throw a ChangedStateException exception.

Applies to

See also