CorAttributeTargets

更新:2007 年 11 月

指定可以对它们应用属性的应用程序元素。

typedef enum CorAttributeTargets
{
    catAssembly            = 0x0001,
    catModule              = 0x0002,
    catClass               = 0x0004,
    catStruct              = 0x0008,
    catEnum                = 0x0010,
    catConstructor         = 0x0020,
    catMethod              = 0x0040,
    catProperty            = 0x0080,
    catField               = 0x0100,
    catEvent               = 0x0200,
    catInterface           = 0x0400,
    catParameter           = 0x0800,
    catDelegate            = 0x1000,
    catGenericParameter    = 0x4000,

    catAll                 = 
        catAssembly | catModule | catClass | catStruct | 
        catEnum | catConstructor | catMethod | catProperty | 
        catField | catEvent | catInterface | catParameter | 
        catDelegate | catGenericParameter,
        
    catClassMembers        = 
        catClass | catStruct | catEnum | catConstructor | 
        catMethod | catProperty | catField | catEvent | 
        catDelegate | catInterface
        
} CorAttributeTargets;

成员

成员

说明

catAssembly

可以对程序集应用属性。

catModule

可以对可移植可执行(.dll 或 .exe)模块应用属性。

catClass

可以对类应用属性。

catStruct

可以对结构应用属性,即值类型。

catEnum

可以对枚举应用属性。

catConstructor

可以对构造函数应用属性。

catMethod

可以对方法应用属性。

catProperty

可以对属性 (Property) 应用属性 (Attribute)。

catField

可以对字段应用属性。

catEvent

可以对事件应用属性。

catInterface

可以对接口应用属性。

catParameter

可以对参数应用属性。

catDelegate

可以对委托应用属性。

catGenericParameter

可以对泛型参数应用属性。

catAll

可以对任何应用程序元素应用属性。

catClassMembers

可以对类的成员应用属性。

备注

可以通过按位“或”运算组合 CorAttributeTargets 枚举值来获得首选组合。

CorAttributeTargets 与托管的 System.AttributeTargets 枚举相同。

要求

**平台:**请参见 .NET Framework 系统要求

**头文件:**CorHdr.h

**.NET Framework 版本:**3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0、1.1、1.0

请参见

其他资源

元数据枚举