_ConstructorInfo.GetCustomAttributes メソッド

定義

GetCustomAttributes メンバーへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

オーバーロード

名前 説明
GetCustomAttributes(Boolean)

GetCustomAttributes(Boolean) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

GetCustomAttributes(Type, Boolean)

GetCustomAttributes(Type, Boolean) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

注釈

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

GetCustomAttributes(Boolean)

GetCustomAttributes(Boolean) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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

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

返品

Object[]

すべてのカスタム属性を含む配列、または属性が定義されていない場合は要素が 0 の配列。

注釈

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

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

適用対象

GetCustomAttributes(Type, Boolean)

GetCustomAttributes(Type, Boolean) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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

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

返品

Object[]

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

注釈

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

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

適用対象