ICustomAttributeProvider 接口

定义

为支持它们的反射对象提供自定义属性。

public interface class ICustomAttributeProvider
public interface ICustomAttributeProvider
[System.Runtime.InteropServices.ComVisible(true)]
public interface ICustomAttributeProvider
type ICustomAttributeProvider = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type ICustomAttributeProvider = interface
Public Interface ICustomAttributeProvider
派生
属性

注解

几乎所有反射类都可以具有与其关联的属性。 属性可以是标准(公共、专用、HelpString)或自定义属性。

方法

名称 说明
GetCustomAttributes(Boolean)

返回此成员上定义的所有自定义属性的数组,不包括命名属性,如果没有自定义属性,则返回空数组。

GetCustomAttributes(Type, Boolean)

返回在此成员上定义的自定义属性的数组(按类型标识)或空数组(如果没有该类型的自定义属性)。

IsDefined(Type, Boolean)

指示是否在此成员上定义一个或多个实例 attributeType

适用于