语言

ChoiceAttribute 类

定义

Choice 属性

[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
继承
ChoiceAttribute
属性

构造函数

名称 说明
ChoiceAttribute(Object[], Object)

创建 ChoiceAttribute with candidates 和 defaultValue.

ChoiceAttribute(Object[])

使用 ChoiceAttributecandidates..

属性

名称 说明
Candidates

获取此选项的候选项。

DefaultValue

获取此选项的默认值。

适用于