Private Set or Private member?

前端 未结 7 2210
旧时难觅i
旧时难觅i 2020-12-29 05:05

I was wondering what\'s considered the C# best practice, private/protected members with public getters, or public getters with private/protected setters?

            


        
7条回答
  •  伪装坚强ぢ
    2020-12-29 05:33

    There is no good answer to this question. the best pratice is to follow our compagnie nomenclature and if your alone then the way you prefer

提交回复
热议问题