I want to do something like this
class SomeClass<T>
{
SomeClass()
{
bool IsInterface = T is ISomeInterface;
}
}
What is the best way to something like this?
Note: I am not looking to constrain T
with a where
, but I would like my code to be aware of what types of interfaces T
implements. I would prefer that I dont have to construct a T
.