MetalamaAPI documentationPost­Sharp API migrationPost­Sharp.​ReflectionReflection­SearchHas­Custom­Attribute
Open sandboxFocus

ReflectionSearch.HasCustomAttribute Method

HasCustomAttribute(Object, Type, Boolean)

In Metalama, use IDeclaration.Attributes.

Declaration
public static bool HasCustomAttribute(object target, Type type, bool inherit = false)
Parameters
Type Name Description
System.Object target
System.Type type
System.Boolean inherit
Returns
Type Description
System.Boolean