You could always use the intent of the feature, and make the auto-property setter private, then implement your domain use case mutator function to encapsulate logic separately.
This would be preferable to writing lots of useless code just because you're used to doing it in a language that refused to come up with a better way.
You could always use the intent of the feature, and make the auto-property setter private, then implement your domain use case mutator function to encapsulate logic separately.
This would be preferable to writing lots of useless code just because you're used to doing it in a language that refused to come up with a better way.
Help us understand the motivation for a private setter. Why not provide only a getter and not have a setter at all?