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 20:57, 25 July 2023
, 9 months ago→{{header|Elena}}
(Pascal entry) |
|||
Line 340:
ELENA does not support adding a field at run-time but it can be simulated with the help of a mix-in.
ELENA
<syntaxhighlight lang="elena">import extensions;
class Extender : BaseExtender
{
this
}
public program()
{
}</syntaxhighlight>
{{out}}
|