Welcome! and rules
Joel on Software
Is Reflection good for object to db persistence?
I would like to define a parent class and then just call "Store" to save/load the object in a table. To reduce the amount of code and make it general, is it possible to inspect the child class and find out the data members names and values? Or is this a stupid idea?
No, it's not a stupid idea - it's one of the reasons that reflection is in the system in the first place.
Custom attributes might be useful, too, rather than just reflection...
There are several java frameworks that make use of this technique. Check out http://castor.exolab.org and http://hibernate.sourceforge.net/ for some examples. I imagine the concepts would be just as applicable to a .NET solution.
Fog Creek Home