Partager via


TBoundPointerProperty.operator PropertyType*() (Compact 7)

3/12/2014

The () overloaded operator returns the value that is contained by the TBoundPointerProperty<PropertyType> object.

Syntax

operator PropertyType*(void)

Parameters

None.

Return Value

Returns the value that is contained by the TBoundPointerProperty<PropertyType> object.

Remarks

By using the () overloaded operator, you can implicitly convert a TBoundPointerProperty<PropertyType> object to the type that you defined in the PropertyType template parameter of TBoundPointerProperty<PropertyType>.

Example

The following example code illustrates one way to use the () overloaded operator.

Important

For readability, the following example code does not contain security checking or error handling. Do not use the following code in a production environment.

#include "XamlRuntime.h"
#include "XRPropertyBag.h"

//Define pointers.
TBoundPointerProperty<IXREnumerable> pValue;
IXREnumerable * newValue;

\\ Convert the TBoundPointerProperty type to to an IXREnumerable pointer.
newValue = (IXREnumerable*)pValue;

Requirements

Header

XRPropertyBag.h

See Also

Reference

TBoundPointerProperty<PropertyType>
TBoundPointerProperty.operator=(const PropertyType *)