Export (0) Print
Expand All

PropertyBuilder.IsDefined Method

Indicates whether one or more instances of attributeType are defined on this property. This method is not supported.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public override bool IsDefined(
	Type attributeType,
	bool inherit
)

Parameters

attributeType
Type: System.Type
The object to which the custom attributes are applied.
inherit
Type: System.Boolean
true to walk up this property's inheritance chain to find the custom attributes; otherwise, false.

Return Value

Type: System.Boolean
true if one or more instances of attributeType are defined on this property; otherwise false.

Implements

ICustomAttributeProvider.IsDefined(Type, Boolean)

ExceptionCondition
NotSupportedException

This method is not supported.

To determine whether a custom attribute has been applied to a property, reflect on the property's parent type after the type is completed, using Type.GetType or Assembly.GetType. Retrieve the PropertyInfo object from the type, and call IsDefined on the PropertyInfo.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft