Method GetCustomAttribute
GetCustomAttribute(ICustomAttributeProvider, string)
Get a certain custom attribute from an attribute provider.
public static CustomAttribute? GetCustomAttribute(this ICustomAttributeProvider cap, string attribute)
Parameters
cap
ICustomAttributeProvider- The attribute provider.
attribute
string- The custom attribute name.
Returns
- CustomAttribute
- The first matching custom attribute, or null if no matching attribute has been found.