ReflectedControllerDescriptor.IsDefined Method (Type, Boolean)


Returns a value that indicates whether one or more instances of a custom attribute type are defined for this member.

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


public override bool IsDefined(
    Type attributeType,
    bool inherit
virtual bool IsDefined(
    Type^ attributeType,
    bool inherit
) override
override IsDefined : 
        attributeType:Type *
        inherit:bool -> bool
Public Overrides Function IsDefined (
    attributeType As Type,
    inherit As Boolean
) As Boolean


  • attributeType
    Type: System.Type

    The type of the custom attributes.

  • inherit
    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 custom attribute type is defined for this member; otherwise, false.


ICustomAttributeProvider.IsDefined(Type, Boolean)

See Also

ReflectedControllerDescriptor Class
System.Web.Mvc Namespace

Return to top