property
This is an old revision of the document!
Property
The property statement can have different forms in X# (it is the .NET equivalent for access/assign in VO). The “full” version (read and write):
property MyProp as string get return _cMyProp end get set _cMyProp := value end set end property
The same in a one-line syntax:
property MyProp as string get _cMyProp set _cMyProp := value
Please note that there is no “return” in the get accessor, and no end statements. An “auto” property (that is a property that defines also the storage):
property MyProp as string auto
Of course you can also define one accessor as static:
property MyProp as string get _cMyProp static set _cMyProp := value
or define only the get (read) or set (write) accessor:
property MyProp as string get _cMyProp
property.1598587278.txt.gz · Last modified: 2020/08/28 04:01 by wolfgangriedmann