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[]) を使用してメソッドを取得し、返された MethodInfo に対して IsDefined(Type, Boolean) を呼び出します。

適用対象