Module.GetCustomAttributesData メソッド
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
リフレクションのみのコンテキストで使用できる、現在のモジュールの CustomAttributeData オブジェクトのリストを返します。
public:
virtual System::Collections::Generic::IList<System::Reflection::CustomAttributeData ^> ^ GetCustomAttributesData();
public virtual System.Collections.Generic.IList<System.Reflection.CustomAttributeData> GetCustomAttributesData ();
abstract member GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
override this.GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
Public Overridable Function GetCustomAttributesData () As IList(Of CustomAttributeData)
現在のモジュールに適用されている属性に関するデータを表す CustomAttributeData オブジェクトのジェネリック リスト。
このメソッドを使用して、リフレクションのみのコンテキストでコードのカスタム属性を調べます。カスタム属性自体が、リフレクション専用コンテキストに読み込まれるコードで定義されている場合に使用します。 や などのAttribute.GetCustomAttributesModule.GetCustomAttributesメソッドは、属性のインスタンスを作成するため、このような場合は使用できません。 リフレクションのみのコンテキスト内のコードは実行できません。 詳細とコード例については、 クラスを CustomAttributeData 参照してください。
製品 | バージョン |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.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, 2.1 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。