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

定義

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

C#
bool ICustomAttributeProvider.IsDefined(Type attributeType, bool inherit);

參數

attributeType
Type

自訂屬性的類型。

inherit
Boolean

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

傳回

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

實作

適用於

產品 版本
.NET Core 1.0, Core 1.1
.NET Standard 1.5, 1.6