Properties

Properties are the public way that callers have to access data stored within fields. With properties you decide what kind of permissions users can have to read and write the actual information. Properties are typically used as fields but they act as methods. In Visual Basic 2010, properties have been completely revisited; in fact, until Visual Basic 2008, a typical property was implemented as follows:

image

You had a private field in which you stored an incoming value and whose value you returned to the callers. Now in Visual Basic 2010, the same property can be defined as follows:

Public Property FirstName As String

This feature is known ...

Get Visual Basic 2010 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.