ConstructorBuilder.GetCustomAttributes メソッド

定義

このコンストラクターに対して定義されているカスタム属性を返します。

オーバーロード

名前 説明
GetCustomAttributes(Boolean)

このコンストラクターに対して定義されているすべてのカスタム属性を返します。

GetCustomAttributes(Type, Boolean)

指定された型によって識別されるカスタム属性を返します。

GetCustomAttributes(Boolean)

このコンストラクターに対して定義されているすべてのカスタム属性を返します。

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[]

この ConstructorBuilder インスタンスによって表されるコンストラクターのすべてのカスタム属性を表すオブジェクトの配列。

例外

このメソッドは現在サポートされていません。

注釈

クラスは基底クラスからコンストラクターを継承しないため、 inherit パラメーターは無視されます。

カスタム属性を取得するには、CreateTypeを呼び出して型の構築を完了し、返された型でGetConstructor メソッドを呼び出してコンストラクターを取得してから、返されたConstructorInfoGetCustomAttributes メソッドを呼び出します。

適用対象

GetCustomAttributes(Type, Boolean)

指定された型によって識別されるカスタム属性を返します。

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[]

このコンストラクターの属性を表すオブジェクト配列。

例外

このメソッドは現在サポートされていません。

注釈

クラスは基底クラスからコンストラクターを継承しないため、 inherit パラメーターは無視されます。

カスタム属性を取得するには、CreateTypeを呼び出して型の構築を完了し、返された型でGetConstructor メソッドを呼び出してコンストラクターを取得してから、返されたConstructorInfoGetCustomAttributes メソッドを呼び出します。

適用対象