Should I use public properties and private fields or public fields for data?

See this article http://blog.codinghorror.com/properties-vs-public-variables/

Specifically

  • Reflection works differently on variables vs. properties, so if you rely on reflection, it’s easier to use all properties.
  • You can’t databind against a variable.
  • Changing a variable to a property is a breaking change.

Leave a Comment