4
Answers

How do you dynamically create & initialise arbitrary objects?

graeme

graeme

15y
3.3k
1
I need to load settings from a file, the file is essentially xml - each 'setting' is an element and has attributes (name, type & value).

I loop through each 'setting' and need to create objects accordingly.

How do I dynamically create objects of the type specified by each 'setting' and initialise them to the specified value?
Answers (4)