I was reading a book called C# Yellow Book by Rob Miles when I came across this statement:
Programmer’s love new shiny toys. They are very keen to use language features to show off. Properties can be a bit like this. When considering properties versus get and set methods I am rather a fan of the old fashioned get and set methods because you know where you are with these. On the other hand I can see where properties might make life easier, if used in the correct way.
I’m not really sure what he means by this. What do you guys suggest? What does MS suggest?
I think you should consider a bit of non-programming advice
.NET has properties ingrained into all of it’s libraries, designers and code generators. It is almost an inseperable part of the platform. If you choose to use get/set accessors instead of normal properties you will be creating a library which has a very different appearance than what every other programmer is expecting.
Using get/set accessors will only increase the chances that you create code which is incompatible with various tools. For instance, there are many tools out there which special case properties and fields and provide special features for them. You will have an equivalent construct but no tool support.