Using full property procedures offers a few advantages, however, including the following:
-
It enables you to perform some basic data checking and refuse invalid information. Don't take this approach too far, however, because rules are often better placed in a different location (such as at the user interface level or in a service provider method).
-
It enables you to use data binding with arrays or collections of this class in Windows Forms and ASP.NET Web pages, which comes in handy.
-
It provides a better level of design-time support. Property procedure settings can be configured through the Properties window in Visual Studio .NET; public variables cannot.