AttributeUsageAttribute.ValidOn 属性

定义

获取一组值,这组值标识指示的属性可应用到的程序元素。Gets a set of values identifying which program elements that the indicated attribute can be applied to.

public:
 property AttributeTargets ValidOn { AttributeTargets get(); };
public AttributeTargets ValidOn { get; }
member this.ValidOn : AttributeTargets
Public ReadOnly Property ValidOn As AttributeTargets

属性值

一个或多个 AttributeTargets 值。One or several AttributeTargets values. 默认值为 AllThe default is All.

适用于

另请参阅