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

定義

attributeTypeの 1 つ以上のインスタンスがこのプロパティで定義されているかどうかを示します。

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

カスタム属性が適用される Type オブジェクト。

inherit
Boolean

このプロパティの継承チェーンをウォークアップしてカスタム属性を検索するかどうかを指定します。

返品

true このプロパティに対して 1 つ以上の attributeType インスタンスが定義されている場合は !。それ以外の場合は false

例外

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

注釈

Type.GetType または Assembly.GetType を使用してプロパティの親型を反映し、その型から Reflection プロパティ オブジェクトを取得し、PropertyInfo.IsDefined を呼び出します。

適用対象