Why won’t anyone accept public fields in C#?

Because it breaks encapsulation — this is why most people use accessors heavily. However, if you think it’s the right solution for your task, ignore it (meaning the strict encapsulation complaints) and do what’s right for your project. Don’t let the OO nazis tell you otherwise.

Leave a Comment