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

定義

COM オブジェクトに、IsDefined(Type, Boolean) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 bool IsDefined(Type ^ attributeType, bool inherit);
public bool IsDefined (Type attributeType, bool inherit);
abstract member IsDefined : Type * bool -> bool
Public Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean

パラメーター

attributeType
Type

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

inherit
Boolean

このメンバーの継承チェーンを検索して属性を見つけるかどうかを指定します。

戻り値

Boolean

このメンバーに attributeType のインスタンスが 1 つ以上適用されている場合は true。それ以外の場合は false.。

注釈

このメソッドはアンマネージ コードからマネージド クラスにアクセスするために使用され、マネージド コードから呼び出しは行う必要はありません。

メソッド IsDefined は、 の 1 つ以上のインスタンスがこの attributeType メンバーに適用されるかどうかを示します。

適用対象