Hi All, We have developed an OR mapping tool in house. Fields and properties are marked up with attributes that describe the mappings. In order to preserve encapsulation, these fields may be private. When it's time to hydrate or persist the object, the mappings are used to gain access to each field.
This works fine except when inheritance comes in to the picture. Classes that derive from other classes obviously can't reflect on their bases private members. If the persistence code was manually coded this wouldn't be a problem as we could just call a virtual method that could call it's base however I am trying to perform the hydration, serialisation on the basis of metadata. So far we ahve worked around this by making all the members of the base class protected but it's a pretty crappy solution. So I guess my question is: 'Can I use reflection to gain a reference to a base classes private members?'. Thanks Guys, mal =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
