Is there a smart way to access an object and it's properties from a string.

Suppose I have an object of class Car and properties of weight and maxSpeed. If I read in a config file that has some config parameters for this car,

weight: 5000
maxSpeed: 248

along with a whole bunch of other parameters, is there a decent way to set up my code to fill those parameters in without using a bunch of case of if statements?

i.e.

case paramstring = "weight"
        weight = paramstringvalue

etc. for pages and pages.

Thanks,
Kevin
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to