ModuleBuilder.GetCustomAttributes メソッド
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在の ModuleBuilder に適用されるカスタム属性を返します。
GetCustomAttributes(Boolean) |
現在の ModuleBuilder に適用されたカスタム属性をすべて返します。 |
GetCustomAttributes(Type, Boolean) |
現在の ModuleBuilder に適用されており、指定された属性の型から派生するすべてのカスタム属性を返します。 |
- ソース:
- ModuleBuilder.cs
現在の ModuleBuilder に適用されたカスタム属性をすべて返します。
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes(bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()
パラメーター
- inherit
- Boolean
この型のオブジェクトでは、この引数は無視されます。
戻り値
カスタム属性を含む配列。属性がない場合、配列は空です。
適用対象
.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) |
- ソース:
- ModuleBuilder.cs
現在の ModuleBuilder に適用されており、指定された属性の型から派生するすべてのカスタム属性を返します。
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes(Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()
パラメーター
- attributeType
- Type
属性の派生元となる基本型。
- inherit
- Boolean
この型のオブジェクトでは、この引数は無視されます。
戻り値
attributeType
の任意のレベルから派生したカスタム属性を含む配列。そのような属性がない場合、配列は空です。
例外
attributeType
が null
です。
attributeType
は、ランタイムによって提供された Type オブジェクトではありません。 たとえば、attributeType
は TypeBuilder オブジェクトです。
適用対象
.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) |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。