Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ControllerDescriptor.IsDefined Method (Type, Boolean)


Retrieves a value that indicates whether one or more instance of the specified custom attribute are defined for this member.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public virtual bool IsDefined(
	Type attributeType,
	bool inherit


Type: System.Type

The type of the custom attribute.

Type: System.Boolean

true to look up the hierarchy chain for the inherited custom attribute; otherwise, false.

Return Value

Type: System.Boolean

true if the attributeType is defined for this member; otherwise, false.

Exception Condition

The attributeType parameter is null (Nothing in Visual Basic).

Return to top
© 2015 Microsoft