Module.GetCustomAttributesData メソッド

定義

リフレクションのみのコンテキストで使用できる、現在のモジュールの 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 参照してください。

適用対象