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

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -