Share via


ChoiceAttribute Class

Definition

Choice attribute

[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
public sealed class ChoiceAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)>]
type ChoiceAttribute = class
    inherit Attribute
Public NotInheritable Class ChoiceAttribute
Inherits Attribute
Inheritance
ChoiceAttribute
Attributes

Constructors

ChoiceAttribute(Object[], Object)

Create a ChoiceAttribute with candidates and defaultValue.

ChoiceAttribute(Object[])

Create a ChoiceAttribute with candidates.

Properties

Candidates

Get the candidates of this option.

DefaultValue

Get the default value of this option.

Applies to