ChoiceAttribute Class

Definition

Choice attribute

C#
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
public sealed class ChoiceAttribute : 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

Product Versions
ML.NET 2.0.0, 3.0.0, Preview, 4.0.0