IReference<T> Interface
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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>
public interface class IReference : IPropertyValue
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1640068870, 11621, 4576, 154, 232, 212, 133, 100, 1, 84, 114)]
template <typename T>
struct IReference : IPropertyValue
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.Guid(1640068870, 11621, 4576, 154, 232, 212, 133, 100, 1, 84, 114)]
public interface Nullable<T> : IPropertyValue
Public Interface Nullable(Of T)
Implements IPropertyValue
- T
- Attributes
- Implements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.FoundationContract (introduced in v1.0)
|
bool flag = myScrollViewer.ChangeView(2d, null, null);
bool flag{ myScrollViewer.ChangeView(Windows::Foundation::IReference<double>{2.f}, nullptr, nullptr) };
When programming with .NET, this interface is hidden, and you 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 syntax of the nullable value type (for example, bool? in C#).
When programming with C++/CX, this interface is hidden, and you 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.
IReference<T> inherits IPropertyValue. Types that implement IReference<T> also implement the interface members of IPropertyValue.
Is |
Gets a value that indicates whether the property value is a scalar value. (Inherited from IPropertyValue) |
Type |
Returns the type stored in the property value. (Inherited from IPropertyValue) |
Value |
Gets the type that is represented as an IPropertyValue. |
Get |
Returns the Boolean value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of Boolean values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the Unicode character stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of Unicode characters stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the date and time value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of date and time values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the floating-point value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of floating-point values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the GUID value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of GUID values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of inspectable objects stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the integer value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of integer values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the integer value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of integer values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the integer value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of integer values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the point structure stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of point structures stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the rectangle structure stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of rectangle structures stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the floating-point value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of floating-point values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the size structure stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of size structures stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the string value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of string values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the time interval value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of time interval values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the unsigned integer value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of unsigned integer values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the unsigned integer value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of unsigned integer values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the unsigned integer value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of unsigned integer values stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the byte value stored as a property value. (Inherited from IPropertyValue) |
Get |
Returns the array of byte values stored as a property value. (Inherited from IPropertyValue) |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |