型によって識別されるカスタム属性の配列を返します。
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
この型の継承チェインを検索して属性を見つけるかどうかを指定します。
戻り値
型の継承チェインを検索するかどうかを指定して検索した結果、 attributeType パラメータと一致したこの型で定義されているカスタム属性を格納しているオブジェクトの配列。この型でカスタム属性が定義されていない場合は null 参照 (Visual Basic では Nothing) 。
実装
ICustomAttributeProvider.GetCustomAttributes
例外
例外の種類 | 条件 |
---|---|
ArgumentException | attributeType が null 参照 (Visual Basic では Nothing) です。 |
ReflectionTypeLoadException | カスタム属性の型を読み込むことができません。 |
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
TypeDelegator クラス | TypeDelegator メンバ | System.Reflection 名前空間 | TypeDelegator.GetCustomAttributes オーバーロードの一覧