Assembly.GetCustomAttributesData メソッド
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在の Assembly に適用されている属性に関する情報を、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.GetCustomAttributes Assembly.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 はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。