Is there a way to test if T inherits/implements a class/interface?
private void MyGenericClass () { if(T ... inherits or implements some class/i
Although IsAssignableFrom is the best way as others have stated, if you only need to check if a class inherits from another, typeof(T).BaseType == typeof(SomeClass) does the job too.
typeof(T).BaseType == typeof(SomeClass)