Properties vs Fields Why Does it Matter? (Jonathan Aneja)
Posted by: The Visual Basic Team,
on 04 Sep 2009 |
View original | Bookmarked: 0 time(s)
The other day I got an email from a developer asking an interesting question about VB10s Auto-implemented Properties feature. I am, however, somewhat confused regarding the properties feature you mentioned - i.e. turning 11 lines of get/set/backing variable into one line. Wouldn't this be exactly the same as the existing functionality of creating a public variable? I see no benefit for using a property in this case, except perhaps for the sake of what some would consider best practice. On...