Assembly.ICustomAttributeProvider.IsDefined(Type, Boolean) 方法

定义

指示是否在该成员上定义了一个或多个 attributeType 实例。Indicates whether one or more instance of attributeType is defined on this member.

 virtual bool System.Reflection.ICustomAttributeProvider.IsDefined(Type ^ attributeType, bool inherit) = System::Reflection::ICustomAttributeProvider::IsDefined;
bool ICustomAttributeProvider.IsDefined (Type attributeType, bool inherit);
abstract member System.Reflection.ICustomAttributeProvider.IsDefined : Type * bool -> bool
override this.System.Reflection.ICustomAttributeProvider.IsDefined : Type * bool -> bool
Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean Implements ICustomAttributeProvider.IsDefined

参数

attributeType
Type

自定义属性的类型。The type of the custom attributes.

inherit
Boolean

true 时,查找继承的自定义特性的层次结构链。When true, look up the hierarchy chain for the inherited custom attribute.

返回

Boolean

如果在该成员上定义 attributeType,则为 true;否则为 falsetrue if the attributeType is defined on this member; false otherwise.

实现

适用于