B
bonk
When I have an instance of an object wich is of type System.Type, how
can I find out if it directly or indirecly derives from another type?
myTypeInstance == typeof(AnotherType)
only seems to check if they are ultimately the same type (at the very
bottom of the inheritance hirarchy) but in case myTypeInstance is
"TypeDerivedFromAnotherType" the above evaluates to false..
myTypeInstance.BaseType == typeof(AnotherType)
does the same, only for the direct base class.
can I find out if it directly or indirecly derives from another type?
myTypeInstance == typeof(AnotherType)
only seems to check if they are ultimately the same type (at the very
bottom of the inheritance hirarchy) but in case myTypeInstance is
"TypeDerivedFromAnotherType" the above evaluates to false..
myTypeInstance.BaseType == typeof(AnotherType)
does the same, only for the direct base class.