FieldBuilder.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 attributeTypeの 1 つ以上のインスタンスがこのフィールドに定義されている場合は。それ以外の場合はfalse

例外

このメソッドは現在サポートされていません。 GetField(String, BindingFlags)を使用してフィールドを取得し、返されたFieldInfoIsDefined(Type, Boolean)を呼び出します。

適用対象