Skip to Content
Visual Basic 2015 Unleashed
book

Visual Basic 2015 Unleashed

by Alessandro Del Sole
July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Sams
Content preview from Visual Basic 2015 Unleashed

Storing Information with Properties

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

Private _firstName As StringPublic Property FirstName As String    Get        Return _firstName    End Get    Set(ByVal value As String)        _firstName = value    End SetEnd Poperty

You had a private field in which you stored an incoming value and whose value you returned ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Visual Basic 2015

Beginning Visual Basic 2015

Bryan Newsome

Publisher Resources

ISBN: 9780134196664Purchase book