TypeDelegator.GetCustomAttributes メソッド

定義

この型の定義済みのカスタム属性をすべて返します。

オーバーロード

GetCustomAttributes(Boolean)

型の継承チェーンを検索するかどうかを指定して、この型に定義されているすべてのカスタム属性を返します。

GetCustomAttributes(Type, Boolean)

型によって識別されるカスタム属性の配列を返します。

GetCustomAttributes(Boolean)

Source:
TypeDelegator.cs
Source:
TypeDelegator.cs
Source:
TypeDelegator.cs

型の継承チェーンを検索するかどうかを指定して、この型に定義されているすべてのカスタム属性を返します。

public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes (bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()

パラメーター

inherit
Boolean

この型の継承チェーンを検索して属性を見つけるかどうかを指定します。

戻り値

Object[]

この型に定義されているすべてのカスタム属性を格納しているオブジェクトの配列。

例外

カスタム属性の型を読み込むことはできません。

適用対象

GetCustomAttributes(Type, Boolean)

Source:
TypeDelegator.cs
Source:
TypeDelegator.cs
Source:
TypeDelegator.cs

型によって識別されるカスタム属性の配列を返します。

public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes (Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()

パラメーター

attributeType
Type

型により識別されるカスタム属性の配列。

inherit
Boolean

この型の継承チェーンを検索して属性を見つけるかどうかを指定します。

戻り値

Object[]

型の継承チェーンを検索するかどうかを指定して検索した結果、attributeType パラメーターと一致したこの型で定義されているカスタム属性を格納しているオブジェクトの配列。この型でカスタム属性が定義されていない場合は null

例外

attributeTypenullです。

カスタム属性の型を読み込むことはできません。

適用対象