vendredi 4 mars 2022

C# Should I make readonly properties all public [closed]

I started in a new project and a colleague is insisting of making all readonly properties public I argued (because I was learned to) that the encapsulation should be always as high as possible, so for me does not make any sense use public accessor in a property that could be protected or private, just because it is read only. What is the benefit of doing so?

Aucun commentaire:

Enregistrer un commentaire