次の方法で共有


Attribute.GetCustomAttributes メソッド (Module)

指定したモジュールに適用されている指定の型のカスタム属性の配列、または基本クラスから継承された指定の型のカスタム属性の配列を取得します。

Overloads Public Shared Function GetCustomAttributes( _
   ByVal element As Module _) As Attribute()
[C#]
public static Attribute[] GetCustomAttributes(Moduleelement);
[C++]
public: static Attribute* GetCustomAttributes(Module* element) [];
[JScript]
public static function GetCustomAttributes(
   element : Module) : Attribute[];

パラメータ

  • element
    ポータブル実行可能 (PE) ファイルを記述する Module クラスから派生したオブジェクト。

戻り値

element に適用されるカスタム属性を格納している Attribute 配列。

または

そのようなカスタム属性が存在しない場合は空の配列。

例外

例外の種類 条件
ArgumentNullException element が null 参照 (Visual Basic では Nothing) です。

解説

戻り値には、 element の祖先のカスタム属性が含まれます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard

参照

Attribute クラス | Attribute メンバ | System 名前空間 | Attribute.GetCustomAttributes オーバーロードの一覧