次の方法で共有


ConstructorBuilder.IsDefined メソッド

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

Overrides Public Function IsDefined( _
   ByVal attributeType As Type, _   ByVal inherit As Boolean _) As Boolean Implements ICustomAttributeProvider.IsDefined
[C#]
public override bool IsDefined(TypeattributeType,boolinherit);
[C++]
public: bool IsDefined(Type* attributeType,boolinherit);
[JScript]
public override function IsDefined(
   attributeType : Type,inherit : Boolean) : Boolean;

パラメータ

  • attributeType
    カスタム属性の型。
  • inherit
    基本クラスからのカスタム属性の継承を制御します。このパラメータは無視されます。

戻り値

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

実装

ICustomAttributeProvider.IsDefined

例外

例外の種類 条件
NotSupportedException このメソッドは、現在サポートされていません。コンストラクタを取得するには、 GetConstructor を使用し、返された ConstructorInfoIsDefined を呼び出します。

解説

binaryAttribute の書式設定方法については、メタデータの仕様を参照してください。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

ConstructorBuilder クラス | ConstructorBuilder メンバ | System.Reflection.Emit 名前空間