AttributeUsageAttribute.AllowMultiple 属性

定义

获取或设置一个布尔值,该值指示是否可以为单个程序元素指定多个已指示特性的实例。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.

适用于

另请参阅