Add a variable to a class instance at runtime: Difference between revisions
Add a variable to a class instance at runtime (view source)
Revision as of 22:38, 14 December 2017
, 6 years ago→{{header|Julia}}
Line 595:
For special situations, such as when parsing an input file, where new data type names
may be appropriate, this can be accommodated using a Dict as one of the class variables.
For example, consider the below
where the type of phone numbers for the person is unknown until run-time:
<lang xml>
|