ParameterInfo.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.

實作

適用於