Introduction
In this post, I show 6 ways to implement auto-implemented properties in C#. An auto-implemented property is a short-hand wa...
For further actions, you may consider blocking this person and/or reporting abuse
Using
private setdoesn't mean the property can only be set via the constructor. It can be set from anywhere inside the instance. This is still a mutable property, only you now have full control over its set calls:If you want an immutable property, you can use a get-only property (meaning it has to be initialized either directly or from a constructor) or a get/init property (so it can also be initialized from object initialization: