Question
Creating dynamically-named variables inside a class
I'd like to have a class that creates the necessary amount of
variables when it's instantiated according to data passed to its
constructor. This means that, in the class definition, I cannot
declare any of these - they wouldn't exist before the class is
used. The situation is just in creating page variables to then set
from false to true when completed. I would just need to create
internal booleans named page#, and set them to false (page0 =
false, page1 = false, etc.).
Of course, when trying this, I get an error "Cannot create property..." - so how is this properly done?
Of course, when trying this, I get an error "Cannot create property..." - so how is this properly done?