Abstract
Properties have been part of Visual Basic for a long time. In this chapter, we describe how Visual Basic .NET extends the support for properties found in earlier versions of the language. Well see plenty of examples along the way, to illustrate how properties can improve the encapsulation, usability, and robustness of our classes. In this chapter we will cover:
-
The implementation of properties in VB.NET
-
Scalar properties, and their advantages over fields and methods
-
How properties look when compiled to MSIL
-
Read-only and write-only properties, and when to use them
-
Shared properties and when to use them
-
Indexed properties, including default properties and overloading
So, let’s start by defining how properties are implemented in Visual Basic .NET.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2003 Damon Allison, Andy Olson, and James Speer
About this chapter
Cite this chapter
Allison, D., Olsen, A., Speer, J. (2003). Properties. In: Visual Basic .NET Class Design Handbook: Coding Effective Classes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0780-1_6
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0780-1_6
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-59059-275-5
Online ISBN: 978-1-4302-0780-1
eBook Packages: Springer Book Archive