AttributeUsageAttribute.AllowMultiple 屬性

定義

取得或設定布林值 (Boolean),指出所指定屬性的幾個執行個體能否指定給單一程式項目。Gets or sets a Boolean value indicating whether more than one instance of the indicated attribute can be specified for a single program element.

public:
 property bool AllowMultiple { bool get(); void set(bool value); };
public bool AllowMultiple { get; set; }
member this.AllowMultiple : bool with get, set
Public Property AllowMultiple As Boolean

屬性值

如果允許指定一個以上的執行個體,則為 true,否則為 falsetrue if more than one instance is allowed to be specified; otherwise, false. 預設為 falseThe default is false.

備註

可以為程式專案指定多次的屬性稱為多用途屬性。An attribute that can be specified more than once for a program element is called a multi-use attribute. 只能指定一次的屬性稱為單一使用屬性。An attribute that can be specified only once is called a single-use attribute.

適用於

另請參閱