Dela via


IReference<T> Interface

Definition

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

Type Parameters

T
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced in v1.0)

Examples

bool flag = myScrollViewer.ChangeView(2d, null, null);
bool flag{ myScrollViewer.ChangeView(Windows::Foundation::IReference<double>{2.f}, nullptr, nullptr) };

Remarks

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.

Interface inheritance

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

Properties

IsNumericScalar

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.

Methods

GetBoolean()

Returns the Boolean value stored as a property value.

(Inherited from IPropertyValue)
GetBooleanArray(Boolean[])

Returns the array of Boolean values stored as a property value.

(Inherited from IPropertyValue)
GetChar16()

Returns the Unicode character stored as a property value.

(Inherited from IPropertyValue)
GetChar16Array(Char[])

Returns the array of Unicode characters stored as a property value.

(Inherited from IPropertyValue)
GetDateTime()

Returns the date and time value stored as a property value.

(Inherited from IPropertyValue)
GetDateTimeArray(DateTime[])

Returns the array of date and time values stored as a property value.

(Inherited from IPropertyValue)
GetDouble()

Returns the floating-point value stored as a property value.

(Inherited from IPropertyValue)
GetDoubleArray(Double[])

Returns the array of floating-point values stored as a property value.

(Inherited from IPropertyValue)
GetGuid()

Returns the GUID value stored as a property value.

(Inherited from IPropertyValue)
GetGuidArray(Guid[])

Returns the array of GUID values stored as a property value.

(Inherited from IPropertyValue)
GetInspectableArray(Object[])

Returns the array of inspectable objects stored as a property value.

(Inherited from IPropertyValue)
GetInt16()

Returns the integer value stored as a property value.

(Inherited from IPropertyValue)
GetInt16Array(Int16[])

Returns the array of integer values stored as a property value.

(Inherited from IPropertyValue)
GetInt32()

Returns the integer value stored as a property value.

(Inherited from IPropertyValue)
GetInt32Array(Int32[])

Returns the array of integer values stored as a property value.

(Inherited from IPropertyValue)
GetInt64()

Returns the integer value stored as a property value.

(Inherited from IPropertyValue)
GetInt64Array(Int64[])

Returns the array of integer values stored as a property value.

(Inherited from IPropertyValue)
GetPoint()

Returns the point structure stored as a property value.

(Inherited from IPropertyValue)
GetPointArray(Point[])

Returns the array of point structures stored as a property value.

(Inherited from IPropertyValue)
GetRect()

Returns the rectangle structure stored as a property value.

(Inherited from IPropertyValue)
GetRectArray(Rect[])

Returns the array of rectangle structures stored as a property value.

(Inherited from IPropertyValue)
GetSingle()

Returns the floating-point value stored as a property value.

(Inherited from IPropertyValue)
GetSingleArray(Single[])

Returns the array of floating-point values stored as a property value.

(Inherited from IPropertyValue)
GetSize()

Returns the size structure stored as a property value.

(Inherited from IPropertyValue)
GetSizeArray(Size[])

Returns the array of size structures stored as a property value.

(Inherited from IPropertyValue)
GetString()

Returns the string value stored as a property value.

(Inherited from IPropertyValue)
GetStringArray(String[])

Returns the array of string values stored as a property value.

(Inherited from IPropertyValue)
GetTimeSpan()

Returns the time interval value stored as a property value.

(Inherited from IPropertyValue)
GetTimeSpanArray(TimeSpan[])

Returns the array of time interval values stored as a property value.

(Inherited from IPropertyValue)
GetUInt16()

Returns the unsigned integer value stored as a property value.

(Inherited from IPropertyValue)
GetUInt16Array(UInt16[])

Returns the array of unsigned integer values stored as a property value.

(Inherited from IPropertyValue)
GetUInt32()

Returns the unsigned integer value stored as a property value.

(Inherited from IPropertyValue)
GetUInt32Array(UInt32[])

Returns the array of unsigned integer values stored as a property value.

(Inherited from IPropertyValue)
GetUInt64()

Returns the unsigned integer value stored as a property value.

(Inherited from IPropertyValue)
GetUInt64Array(UInt64[])

Returns the array of unsigned integer values stored as a property value.

(Inherited from IPropertyValue)
GetUInt8()

Returns the byte value stored as a property value.

(Inherited from IPropertyValue)
GetUInt8Array(Byte[])

Returns the array of byte values stored as a property value.

(Inherited from IPropertyValue)

Applies to

See also