I'm using GetProperties to get a list of properties for a class.
Dim properties As List(Of PropertyInfo) = objType.GetProperties(BindingFlags.Instance Or BindingFlags.Public).ToList()
For Each prop As PropertyInfo In properties
'how do I get the parent class type of the prop (level up in hierarchy from property's ReflectedType)?
Next
How do I get the parent class's one level up of the current property's ReflectedType
? Note that this class could have multiple parent levels. I don't want the BaseType
of the current property's class, but simply the next level up in the hierarchy of the property's ReflectedType
as a property could be several layers deep.