語言

ChoiceAttribute 類別

定義

選擇屬性

[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
屬性

建構函式

名稱 Description
ChoiceAttribute(Object[], Object)

建立一個 ChoiceAttribute ,且 candidatesdefaultValue。

ChoiceAttribute(Object[])

建立一個 ChoiceAttribute ,其中 candidates。

屬性

名稱 Description
Candidates

取得這個選項的候選人。

DefaultValue

取得這個選項的預設值。

適用於