Export (0) Print
Expand All

FieldBuilder.IsDefined Method

Indicates whether an attribute having the specified type is defined on a field.

[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 of the attribute.
inherit
Controls inheritance of custom attributes from base classes.

Return Value

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

Implements

ICustomAttributeProvider.IsDefined

Exceptions

Exception Type Condition
NotSupportedException This method is not currently supported. Retrieve the field using GetField and call IsDefined on the returned FieldInfo.

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

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

Show:
© 2014 Microsoft