12 June 2015

Properties vs Fields – Why Does it Matter?

On the surface there doesn’t seem to be a big difference between this:
Public Property Name() As String
And this:
Public Name() As String

Clearly both will expose an object’s state to the outside world, and can be read/modified using the exact same syntax. Which then begs the question, why would I ever use a property if I have no special logic in the Getter/Setter?


Via