DEV Community

Discussion on: Why all our objects be a little more private

Collapse
 
jeastham1993 profile image
James Eastham

Ahhh, I didn't realize c# 6 introduced read only for all properties. I've used read only collections pretty extensively but never for other types.

Yeah, in some cases there is a use case for non private setters. But I can think of almost zero situations where a private one wouldn't give more robust and easy to amend code.