Given a generic class definition BaseClass<T>
, is it possible to test this condition?
if (myvar is BaseClass<>)
I would like to know if myvar derives from the generic class, but I do not know (or care) what T
might be.
I assume the answer is no... my backup plan is to caveman this via myvar.GetType().ToString().Contains("BaseClass<")
, or something.