P
Peter
Hi
I was wondering, why use properties instead of get and set methods?
I have a colleague who dislikes properties - and much prefers to write
"string GetName()" and "void SetName(string name)" methods for example.
Are there any arguments as to why properties are better? Or is it just
a matter or preference? Personally I like them - I think they "look
nice", but that's about as good as I can do :-|
(And I think automatic properties are a nice enhancement too).
Thanks,
Peter
I was wondering, why use properties instead of get and set methods?
I have a colleague who dislikes properties - and much prefers to write
"string GetName()" and "void SetName(string name)" methods for example.
Are there any arguments as to why properties are better? Or is it just
a matter or preference? Personally I like them - I think they "look
nice", but that's about as good as I can do :-|
(And I think automatic properties are a nice enhancement too).
Thanks,
Peter