delphi - Preffered way to define readonly property with getter function -
what preferred method define read property getter function:
tmyclass = class(tobject) private function getvalue: integer public property value: integer read getvalue; end;
or
tmyclass = class(tobject) public function value: integer; end;
[edit]i know matter of taste i'll rephrase question into: pro's , con's of both methods?
the first 1 preferred way it. want read value name it's common way property. function
named instruction getvalue
or extractfilepath
etc. variables , properties named value store.
Comments
Post a Comment