How to copy the properties of one class instance to another instance of the same class?
I want to duplicate a class. It is sufficient that I copy all properties of that class. Is it possible to: loop thru all properties of a class? assign each property to the other property, like a.prop := b.prop ? The getters and setters should take care of the underlying implementation details. EDIT: As Francois pointed out I did not word my question carefully enough. I hope the new wording of the question is better SOLUTION: Linas got the right solution. Find a small demo program below. Derived classes work as expected. I didn't know about the new RTTI possibilities until several people