Barry Kelly <ba***********@gmail.com> wrote:
Use properties. There's no cost to using them, only upside.
I think there is a cost to them -- extra code and readability. Indeed,
if I were to use only the simple getter/setter properties for an
internal class, my instinct would be to declare them just as public
fields.
That way, if the complexity of your app later merits the change to
properties, you can change them to properties and recompile. (well, if
you did anything like "obj.field += 5" or passing obj.field by
reference then it would give errors to make you change them. But that
kind of error seems salutory to me.)
--
Lucian