MethodBuilder.GetCustomAttributes メソッド

定義

このメソッドに定義されたカスタム属性を返します。

オーバーロード

GetCustomAttributes(Boolean)

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

GetCustomAttributes(Type, Boolean)

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

GetCustomAttributes(Boolean)

ソース:
MethodBuilder.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[]

このメソッドのすべてのカスタム属性を表す、オブジェクトの配列を返します。

例外

このメソッドは現在サポートされていません。 GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) を使用してメソッドを取得し、返された MethodInfo に対して GetCustomAttributes(Boolean) を呼び出します。

適用対象

GetCustomAttributes(Type, Boolean)

ソース:
MethodBuilder.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 型であるものを表すオブジェクトの配列を返します。

例外

このメソッドは現在サポートされていません。 GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) を使用してメソッドを取得し、返された MethodInfo に対して GetCustomAttributes(Boolean) を呼び出します。

適用対象