ICustomAttributeProvider.IsDefined(Type, Boolean) 方法

定義

指出此成員上是否有定義一個或多個 attributeType 執行個體。

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

自訂屬性的類型。

inherit
Boolean

true 時,請查閱繼承自訂屬性的階層鏈結。

傳回

如果此成員上已定義 attributeType,則為 true,否則為 false

適用於