_MethodInfo.GetCustomAttributes メソッド

定義

COM オブジェクトに、GetCustomAttributes メソッドへのバージョンに依存しないアクセスが用意されています。

オーバーロード

GetCustomAttributes(Boolean)

COM オブジェクトに、GetCustomAttributes(Boolean) メソッドへのバージョンに依存しないアクセスが用意されています。

GetCustomAttributes(Type, Boolean)

COM オブジェクトに、GetCustomAttributes(Type, Boolean) メソッドへのバージョンに依存しないアクセスが用意されています。

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メンバーは、 GetCustomAttributes このメンバーに適用されたすべての属性を返します。

GetCustomAttributes(Boolean)

COM オブジェクトに、GetCustomAttributes(Boolean) メソッドへのバージョンに依存しないアクセスが用意されています。

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

パラメーター

inherit
Boolean

このメンバーの継承チェーンを検索して属性を見つける場合は true。それ以外の場合は false

戻り値

Object[]

すべてのカスタム属性を含む配列。定義されている属性がない場合は要素がゼロ (0) の配列。

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは GetCustomAttributes 、すべてのカスタム属性を含む配列を返します。

適用対象

GetCustomAttributes(Type, Boolean)

COM オブジェクトに、GetCustomAttributes(Type, Boolean) メソッドへのバージョンに依存しないアクセスが用意されています。

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

パラメーター

attributeType
Type

検索する属性の種類。 この型に代入可能な属性だけが返されます。

inherit
Boolean

このメンバーの継承チェーンを検索して属性を見つける場合は true。それ以外の場合は false

戻り値

Object[]

このメンバーに適用されているカスタム属性の配列。適用されている属性がない場合は、要素がゼロ (0) の配列。

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは GetCustomAttributes 、 によって Type識別されるカスタム属性の配列を返します。

適用対象