英語で読む

次の方法で共有


ICustomAttributeProvider インターフェイス

定義

リフレクション オブジェクトがサポートするために、カスタム属性を提供します。

C#
public interface ICustomAttributeProvider
C#
[System.Runtime.InteropServices.ComVisible(true)]
public interface ICustomAttributeProvider
派生
属性

注釈

ほぼすべての Reflection クラスに属性を関連付けることができます。 属性には、標準 (パブリック、プライベート、HelpString) またはカスタムを指定できます。

メソッド

GetCustomAttributes(Boolean)

名前付きの属性を除く、このメンバーに定義されているすべてのカスタム属性の配列、またはカスタム属性がない場合は空の配列を返します。

GetCustomAttributes(Type, Boolean)

型で識別された、このメンバーに定義されているカスタム属性の配列、または、この型のカスタム属性がない場合は空の配列を返します。

IsDefined(Type, Boolean)

attributeType の 1 つ以上のインスタンスがこのメンバーで定義されているかどうかを示します。

適用対象

製品 バージョン
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.5, 1.6, 2.0, 2.1