IsDefined Method

TypeDelegator.IsDefined Method

Indicates whether a custom attribute identified by attributeType is defined.

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

Parameters

attributeType
An array of custom attributes identified by type.
inherit
Specifies whether to search this type's inheritance chain to find the attributes.

Return Value

true if a custom attribute identified by attributeType is defined; otherwise, false.

Implements

ICustomAttributeProvider.IsDefined

Exceptions

Exception Type Condition
ArgumentException attributeType is a null reference (Nothing in Visual Basic).
ReflectionTypeLoadException The custom attribute type cannot be loaded.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

TypeDelegator Class | TypeDelegator Members | System.Reflection Namespace

Show:
© 2016 Microsoft