Array of pointers to member variables?

Jan 19 2005 1:34 PM
Hi I have several classes that have basically the same code: they assign the contents of a datareader to the member variables in the class. I want to put this code into a generic super class but to do this I would need some way of assigning to the member variables of the sub class without knowing their names. If I could create an array in the sub class to store pointers to the member variables then in the super class I could enumerate through the array and through the datareader to make the assignments. I don't want to use unmanaged code really. Is there a way (or another way) of doing this ?