ConstructorBuilder.IsDefined(Type, Boolean) 方法

定义

检查是否定义了指定的自定义属性类型。

public:
 override bool IsDefined(Type ^ attributeType, bool inherit);
public override bool IsDefined(Type attributeType, bool inherit);
override this.IsDefined : Type * bool -> bool
Public Overrides Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean

参数

attributeType
Type

自定义属性类型。

inherit
Boolean

控制从基类继承自定义属性。 忽略此参数。

返回

true 如果定义了指定的自定义属性类型,否则,为 false.

例外

目前不支持此方法。 可以使用和调用GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])返回IsDefined(Type, Boolean)的构造函数来检索构造函数ConstructorInfo

注解

有关如何设置格式 binaryAttribute的详细信息,请参阅元数据规范。

适用于