The short option is that always using properties instead of public (or, indeed, even protected ) fields has become a fundamental design choice in .NET from the very beginning.
A slightly longer version is that adding support for public fields would add complexity to the data binding structure (depending on what you're talking about). The field also lacks any support for notification of changes, which is a rather important aspect of data binding (at least in a stateful environment such as Winforms development). Even at the level of extracting and setting values, the fields and properties are different; while the syntax in VB.NET or C # to retrieve or set the value of a property (by design) is similar to the field syntax, the mechanism used for this in a programming script such as data binding is different for properties vs. fields.
In the end, all of this simply means that adding support for open fields to any data binding scenario will require more work, therefore, since this is an anti-pattern, this work is not performed.
Adam robinson
source share