HasCustomAttribute(object, Type, bool)
Determines whether a declaration has a custom attribute of a given type, including those who have been added indirectly, for instance through MulticastAttribute.
Declaration
public static bool HasCustomAttribute(object target, Type type, bool inherit = false)Parameters
| Type | Name | Description |
|---|---|---|
| object | target | Element of code (Type, MethodInfo, ...) whose custom attributes are requested. |
| Type | type | The type of custom attributes. |
| bool | inherit |
|
Returns
| Type | Description |
|---|---|
| bool | True if |