Method GetAttribute
GetAttribute<T>(Type)
Helper method to get the first attribute of type T
on a given type.
Declaration
public static T GetAttribute<T>(this Type type) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to explore |
Returns
Type | Description |
---|---|
T | The attribute found |
Type Parameters
Name | Description |
---|---|
T | The attribute type to look for |