次の方法で共有


PropertyBuilder.GetCustomAttributes メソッド (Boolean)

このプロパティのすべてのカスタム属性の配列を返します。

Overrides Overloads Public Function GetCustomAttributes( _
   ByVal inherit As Boolean _) As Object() Implements ICustomAttributeProvider.GetCustomAttributes
[C#]
public override object[] GetCustomAttributes(boolinherit);
[C++]
public: Object* GetCustomAttributes(boolinherit)  __gc[];
[JScript]
public override function GetCustomAttributes(
   inherit : Boolean) : Object[];

パラメータ

  • inherit
    このプロパティの継承チェインを検索して、カスタム属性を見つける場合は true

戻り値

すべてのカスタム属性の配列。

実装

ICustomAttributeProvider.GetCustomAttributes

例外

例外の種類 条件
NotSupportedException このメソッドはサポートされていません。

解説

Type.GetType または Assembly.GetType を使用してプロパティの親の型にリフレクションし、型から Reflection プロパティ オブジェクトを取得し、PropertyInfo.GetCustomAttributes を呼び出します。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

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