指定された型によって識別されるカスタム属性を返します。
Overrides Overloads Public Function GetCustomAttributes( _
ByVal attributeType As Type, _ ByVal inherit As Boolean _) As Object() Implements ICustomAttributeProvider.GetCustomAttributes
[C#]
public override object[] GetCustomAttributes(TypeattributeType,boolinherit);
[C++]
public: Object* GetCustomAttributes(Type* attributeType,boolinherit) __gc[];
[JScript]
public override function GetCustomAttributes(
attributeType : Type,inherit : Boolean) : Object[];
パラメータ
- attributeType
カスタム属性の型。 - inherit
このメンバの継承チェインを検索して属性を見つけるかどうかを指定します。
戻り値
このメソッドの属性を表すオブジェクトの配列を返します。メソッドの属性は、 Type 属性型です。
実装
ICustomAttributeProvider.GetCustomAttributes
例外
例外の種類 | 条件 |
---|---|
NotSupportedException | このメソッドは、現在サポートされていません。 GetMethod を使用してメソッドを取得し、返された MethodInfo に対して GetCustomAttributes を呼び出します。 |
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
MethodBuilder クラス | MethodBuilder メンバ | System.Reflection.Emit 名前空間 | MethodBuilder.GetCustomAttributes オーバーロードの一覧