IXRCollection<In_T, Out_T>::IndexOf (Windows Embedded CE 6.0)
1/6/2010
This method searches for the specified item and retrieves the zero-based index of its first occurrence within this collection.
Syntax
virtual HRESULT STDMETHODCALLTYPE IndexOf(
In_T pvalue,
int *pIndex
) = 0;
Parameters
pvalue
[in] A value that represents an item to locate in this collection.In inherited classes, the type of this item corresponds to the specific collection type that inherits from this template class.
- pIndex
[out] On return, pointer to an integer value that indicates the zero-based index of the first occurrence of pvalue within this collection.
Return Value
Returns an HRESULT that indicates success or failure.
Remarks
This method performs a linear search through the collection. Therefore, the average execution time is proportional to the number of items. You can retrieve the number of items by using IXRCollection<In_T, Out_T>::GetCount.
By default, this method searches the collection starting at the first item, and ending at the last item. However, if this collection contains the item in pvalue more than once, it will retrieve the first occurrence of the item.
.NET Framework Equivalent
System.Windows.PresentationFrameworkCollection(T).IndexOf
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |