G
Guest
Is it possible to reference all the public properties that are in a class
within that class's constructor using REFLECTION, and then reference them
with a string variable?
I have a class that will have 35 integer values as public properties that
must be read in from a database. Also, each property of this class will have
the same name as the column name from the dbase table. For that reason, I
would like to just set up a loop to get the property name from the GetName
property in the DataReader, and then assign the value from the read field.
Otherwise I will have to assign each property from the table individually.
within that class's constructor using REFLECTION, and then reference them
with a string variable?
I have a class that will have 35 integer values as public properties that
must be read in from a database. Also, each property of this class will have
the same name as the column name from the dbase table. For that reason, I
would like to just set up a loop to get the property name from the GetName
property in the DataReader, and then assign the value from the read field.
Otherwise I will have to assign each property from the table individually.