英語で読む

次の方法で共有


ModuleBuilder.GetCustomAttributes メソッド

定義

現在の ModuleBuilder に適用されるカスタム属性を返します。

オーバーロード

GetCustomAttributes(Boolean)

現在の ModuleBuilder に適用されたカスタム属性をすべて返します。

GetCustomAttributes(Type, Boolean)

現在の ModuleBuilder に適用されており、指定された属性の型から派生するすべてのカスタム属性を返します。

GetCustomAttributes(Boolean)

ソース:
ModuleBuilder.cs

現在の ModuleBuilder に適用されたカスタム属性をすべて返します。

C#
public override object[] GetCustomAttributes(bool inherit);

パラメーター

inherit
Boolean

この型のオブジェクトでは、この引数は無視されます。

戻り値

Object[]

カスタム属性を含む配列。属性がない場合、配列は空です。

適用対象

.NET 10 およびその他のバージョン
製品 バージョン
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0 (package-provided)

GetCustomAttributes(Type, Boolean)

ソース:
ModuleBuilder.cs

現在の ModuleBuilder に適用されており、指定された属性の型から派生するすべてのカスタム属性を返します。

C#
public override object[] GetCustomAttributes(Type attributeType, bool inherit);

パラメーター

attributeType
Type

属性の派生元となる基本型。

inherit
Boolean

この型のオブジェクトでは、この引数は無視されます。

戻り値

Object[]

attributeType の任意のレベルから派生したカスタム属性を含む配列。そのような属性がない場合、配列は空です。

例外

attributeTypenullです。

attributeTypeは、ランタイムによって提供された Type オブジェクトではありません。 たとえば、attributeTypeTypeBuilder オブジェクトです。

適用対象

.NET 10 およびその他のバージョン
製品 バージョン
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 2.0 (package-provided)