One other thing to consider is that fields cannot be part of an interface, so if you are doing TDD and need to mock a field it can't be done.
On Wed, Aug 25, 2010 at 11:28 AM, Mark Hurd <markeh...@gmail.com> wrote: > The thing with properties is that once you have them, changes can be > completed without changing the interface, including the binary > compatibility of public interfaces. > > Nevertheless, if your class of variables is not public I too would > consider just using fields. > -- > Regards, > Mark Hurd, B.Sc.(Ma.)(Hons.) > > On Wed, Aug 25, 2010 at 10:43 AM, Jeff Sinclair > <jeff.sinclair.em...@gmail.com> wrote: > > Can some one tell me why people get so worked up about all fields being > > private and accessed only via properties. > > > > If you have a class which is only used essentially as group of variables, > eg > > to put into a data structure like a tree or something then why not public > > fields? > > > > Do all those properties really add any value? > > > > Jeff >