Reflection/List properties: Difference between revisions
Content deleted Content added
Thundergnat (talk | contribs) m syntax highlighting fixup automation |
imported>Arakov |
||
Line 98: | Line 98: | ||
=={{header|Elena}}== |
=={{header|Elena}}== |
||
ELENA |
ELENA 6.x : |
||
<syntaxhighlight lang="elena">import system'routines; |
<syntaxhighlight lang="elena">import system'routines; |
||
import system'dynamic; |
import system'dynamic; |
||
Line 105: | Line 105: | ||
class MyClass |
class MyClass |
||
{ |
{ |
||
int X : prop; |
|||
string Y : prop; |
|||
} |
} |
||
public program() |
public program() |
||
{ |
{ |
||
Line 117: | Line 117: | ||
this Y := "String"; |
this Y := "String"; |
||
}; |
}; |
||
MyClass.__getProperties().forEach:(p) |
MyClass.__getProperties().forEach:(p) |
||
{ |
{ |
||
console.printLine("o.",p,"=", |
console.printLine("o.",p,"=",p.getPropertyValue(o)) |
||
} |
} |
||
}</syntaxhighlight> |
}</syntaxhighlight> |