in .net, if I have a generic class SomeClass<T>
, is it possible to use the where
keyword to require that T is a class with a certain attribute? something like:
[SomeAttribute]
class MyClass
{
...
}
class AnotherClass<T> where T : Attribute(SomeAttribute)
{
...
}