语言

_Assembly.IsDefined(Type, Boolean) 方法

定义

为 COM 对象提供与版本无关的访问 IsDefined(Type, Boolean) 方法。

public:
 bool IsDefined(Type ^ attributeType, bool inherit);
public bool IsDefined(Type attributeType, bool inherit);
abstract member IsDefined : Type * bool -> bool
Public Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean

参数

attributeType
Type

Type要检查此程序集的自定义属性。

inherit
Boolean

对于此类型的对象,忽略此参数。

返回

如果定义了由指定 标识的自定义属性,则为 。

注解

此方法用于从非托管代码访问托管类,不应从托管代码调用。

该方法 IsDefined 指示是否定义了由指定 Type 标识的自定义属性。

适用于

另请参阅