Attribute 成员

表示自定义属性的基类。

下表列出了由 Attribute 类型公开的成员。

受保护的构造函数

  名称 说明
Protected method Supported by the .NET Compact Framework Attribute 初始化 Attribute 类的新实例。

页首

公共属性

  名称 说明
Public property TypeId 当在派生类中实现时,获取该 Attribute 的唯一标识符。

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework Equals 已重载。 已重写。 
Public method Static Supported by the .NET Compact Framework GetCustomAttribute 已重载。 检索应用于程序集、模块、类型成员或方法参数的指定类型的自定义属性。
Public method Static Supported by the .NET Compact Framework GetCustomAttributes 已重载。 检索应用于程序集、模块、类型成员或方法参数的自定义属性的数组。
Public method Supported by the .NET Compact Framework GetHashCode 已重写。 返回此实例的哈希代码。
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method IsDefaultAttribute 当在派生类中重写时,指示此实例的值是否是派生类的默认值。
Public method Static Supported by the .NET Compact Framework IsDefined 已重载。 确定是否将指定类型的任意自定义属性应用于程序集、模块、类型成员或方法参数。
Public method Supported by the .NET Compact Framework Match 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)

页首

显式接口实现

  名称 说明
Explicit interface implementation Method System.Runtime.InteropServices._Attribute.GetIDsOfNames 将一组名称映射为对应的一组调度标识符。
Explicit interface implementation Method System.Runtime.InteropServices._Attribute.GetTypeInfo 检索对象的类型信息,然后可以使用该信息获取接口的类型信息。
Explicit interface implementation Method System.Runtime.InteropServices._Attribute.GetTypeInfoCount 检索对象提供的类型信息接口的数量(0 或 1)。
Explicit interface implementation Method System.Runtime.InteropServices._Attribute.Invoke 提供对某一对象公开的属性和方法的访问。

页首

请参见

参考

Attribute 类
System 命名空间