I have attribute
[AttributeUsage(AttributeTargets.Class)]
public class CacheAttribute : Attribute
{
}
and generic class
[Cache]
public class BaseClass<T>
{
}
and another class
public class ImplClass : BaseClass<Type>
{
}
When i try to get custom attributes from
BaseClass<Type>
I get my attribute, but not from
ImplClass
My code to get Custom attributes is
typeof(ImplClass).CustomAttributes -> 0
typeof(BaseClass<Type>).CustomAttributes -> 1
How can i inherite attribute to my implementation?
NOTE: There is a similar question How does inheritance work for Attributes? that is not helpful. Unlike that issue, this one is about attribute inheritance in combination with generics.