Windows Dev Center

IReference<T> interface

Enables arbitrary enumerations, structures, and delegate types to be used as property values.

.NET:  This interface appears as Nullable<T>.

C++/CX:  This interface appears as Platform::IBox<T>

Syntax


generic<typename T>
public interface class IReference : IPropertyValue

Attributes

[Version(0x06020000)]

Type parameters

T

The type.

Members

The IReference interface inherits from IPropertyValue. IReference also has these types of members:

Properties

The IReference interface has these properties.

PropertyAccess typeDescription

Value

Read-onlyGets the type that is represented as an IPropertyValue.

 

Remarks

When programming with .NET, this interface is hidden and developers should use the Nullable<T> class. All Windows Runtime members where the basic IDL signature shows IReference (with a constraint) are instead exposed using the nullable syntax of the nullable value type (for example, ?bool).

When programming with C++/CX, this interface is hidden and developers should use the Platform::IBox<T> interface. All Windows Runtime members where the basic IDL signature shows IReference (with a constraint) are instead exposed using Platform::IBox<T> with the template as a particular value type. This is how C++/CX implements nullable value types. For more info, see Value classes and structs (C++/CX).

Because both .NET and C++/CX have projection equivalents, don't implement this interface unless you are using WRL and/or writing code for a Windows Runtime component and need a nullable value type.

Interface inheritance

IReference<T> inherits IPropertyValue. Types that implement IReference<T> also implement the interface members of IPropertyValue.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows::Foundation

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows::Foundation

Metadata

Windows.winmd

See also

IPropertyValue
Nullable<T>
Platform::IBox<T>
Value classes and structs (C++/CX)

 

 

Show:
© 2015 Microsoft