I work with reflection based object translator.
it basically goes through the properties of the object and assigns values ββto properties with the same name / type on the translated object.
ObjectA.Name = "Joe"
translates to:
ObjectB.Name = "Joe"
I need to put in a special case, since the property is a custom class, for example:
ObjectA.Address
i was hoping i could detect such properties with the IsClass PropertyType flag
propInfo.PropertyType.IsClass
but this flag also returns true for string properties.
Is there any other way to verify that a property is of a non-native type?
source share