Share via


IVectorView<T>::IndexOf method

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

Syntax

HRESULT IndexOf(
  [in, optional] T        value,
  [out]          unsigned *index,
  [out, retval]  boolean  *found
);

Parameters

  • value [in, optional]
    Type: T

    The item to find in the vector view.

  • index [out]
    Type: unsigned*

    The zero-based index of the item if found, or zero if the item is not found.

  • found [out, retval]
    Type: boolean*

    A Boolean value that is TRUE if the item is found and FALSE if the item is not found.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

Windows.Foundation.Collections.h

See also

IVectorView<T>