Export (0) Print
Expand All

TypeBuilder.IsDefined Method

Set a custom attribute using a custom attribute builder.

[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
The Type object to which the custom attributes are applied.
inherit
Specifies whether to search this member's inheritance chain to find the attributes.

Return Value

true if one or more instance of attributeType is defined on this member; otherwise false.

Implements

ICustomAttributeProvider.IsDefined

Exceptions

Exception Type Condition
NotSupportedException This method is not currently supported for incomplete types. Retrieve the type using GetType and call IsDefined on the returned Type.

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

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace

Show:
© 2015 Microsoft