Share via


VariantAttribute Class

Definition

Indicates that the item is an instance of a variant IInspectable. Applies to method parameters, properties, and return values of types.

public ref class VariantAttribute sealed : Attribute
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
class VariantAttribute final : Attribute
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.AttributeName("variant")]
class VariantAttribute final : Attribute
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
public sealed class VariantAttribute : Attribute
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.AttributeName("variant")]
public sealed class VariantAttribute : Attribute
function VariantAttribute()
Public NotInheritable Class VariantAttribute
Inherits Attribute
Inheritance
VariantAttribute
Attributes

Windows requirements

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

Constructors

VariantAttribute()

Creates and initializes a new instance of the attribute.

Applies to

See also