Using reflection I get a set of PropertyInfo
:
var infos = typeof(T).GetProperties(.....)
My object (simplified)
Customer
Dog (class with field 'Name')
Cow (class with field 'Name')
FName (string)
When I loop though the infos, I Console Write the Property's value. If the property is a class (Dog, Cow etc) and that class has a "Name" property, then I need to Write the "Name" value.
Basically how do I determine if the MemeberInfo is a class and has a property called "Name" and Write it out?