You can use Properties with Getter and Setter when:
- You want an attribute to be “read only” (just the getter, not the setter). The property can do as little as returning a private field, but whoever is accessing the class won’t have access to write anything in the field (i.e. won’t break anything in your class).
- You want something else to happen when you get or set a value. For instance, you can have a “Color” property in an entity, but when you set it it also sets the Color property of all the entity’s children, etc. A simple field can’t do that.
I’m sure there’s other cases as well, have to go now!
Cheers.