How to determine if a type is in the inheritance hierarchy
You can use the Type.IsAssignableFrom
method.
In VB:
If GetType(Domain).IsAssignableFrom(GetType(DerivedThree)) Then
In C#:
if (typeof(Domain).IsAssignableFrom(typeof(DerivedThree)))
Why is nobody mentioning Type.IsSubclassOf(Type)
?
https://docs.microsoft.com/en-us/dotnet/api/system.type.issubclassof?view=netframework-4.7.2
Careful, it returns false if called for two equal types ;)