Partager via


IXRValueCollection::Contains (Compact 2013)

3/28/2014

This method determines whether an item is in the IXRValueCollection collection.

Syntax

virtual HRESULT STDMETHODCALLTYPE Contains(
    __in XRValue * pValue, 
    __out bool * pResult
) = 0;

Parameters

  • pValue
    [in] Pointer to an XRValue object that represents the item to locate in this collection.
  • pResult
    [out] Pointer to a Boolean value that represents whether pValue was found in the collection.

Return Value

Returns S_OK if successful; otherwise, returns an HRESULT error code. For common error codes for XAML for Windows Embedded, see XAML for Windows Embedded Error Messages.

Remarks

This method performs a linear search. Therefore, the average execution time is proportional to the number of items in the collection, which you can retrieve by using IXRValueCollection::GetCount.

To use a specific interface pointer type, use the helper template version of this method provided by XAML for Windows Embedded. When you supply a derived type, this version automatically supplies a type-safe method that implicitly converts the returned type from a generic interface, so you do not have to explicitly call QueryInterface to convert the generic interface into the required object type.

.NET Framework Equivalent

System.Collections.Generic.ICollection(T).Contains

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRValueCollection
IXRList