Compartilhar via


IXRValueCollection::Remove (Compact 2013)

3/28/2014

This method removes the last occurrence of a specific item from the IXRValueCollection collection.

Syntax

virtual HRESULT STDMETHODCALLTYPE Remove(
    __in XRValue * pValue
) = 0;

Parameters

  • pValue
    [in] Pointer to an XRValue object that represents an item to remove from this 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 through this collection. Therefore, the average execution time is proportional to the number of items in this collection. To retrieve this number, call IXRValueCollection::GetCount.

When the collection contains duplicate values at different indexes, this method searches the collection for each duplicate value in reverse order, starting at the last occurrence of the value, and ending with the first occurrence of the value.

Therefore, if this collection contains the item more than once, it will remove the last occurrence of the item.

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).Remove

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRValueCollection
IXRList