MethodBuilder.IsDefined(Type, Boolean) メソッド

定義

指定したカスタム属性の種類が定義されているかどうかを確認します。

public:
 override bool IsDefined(Type ^ attributeType, bool inherit);
public override bool IsDefined(Type attributeType, bool inherit);
override this.IsDefined : Type * bool -> bool
Public Overrides Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean

パラメーター

attributeType
Type

カスタム属性の型。

inherit
Boolean

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

返品

true 指定したカスタム属性の型が定義されている場合。それ以外の場合は false

例外

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

適用対象