I've searched for a while, but I can't seem to find an answer to this problem. I need to figure out if the object I'm currently looking at IS a Subclass, or alternatively if it is inheriting from another class. I do NOT need to know if this class can inherit from another one, but rather ONLY to know if its a subclass. In the current context, I have no way to know what the parent class is, therefore I can't use:
typeof(Derived).IsSubclassOf(typeof(Base))
typeof(Base).IsAssignableFrom(typeof(Derived))
- I cannot use
is
oras
Is there anything on the Type
class or PropertyInfo
class where I can check this?