次の方法で共有


Assembly.IsDefined メソッド

指定された Type で識別されるカスタム属性が定義されているかどうかを示します。

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

パラメータ

  • attributeType
    このアセンブリで確認するカスタム属性の Type
  • inherit
    この型のオブジェクトでは、この引数は無視されます。

戻り値

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

実装

ICustomAttributeProvider.IsDefined

例外

例外の種類 条件
ArgumentNullException attributeType が null 参照 (Visual Basic では Nothing) です。

必要条件

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

.NET Framework セキュリティ:

参照

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