Summary

Shared members allow you to perform operations, and shared fields and properties allow you to maintain state information when only one instance of the information is needed. The general class and object relationship supports maintaining individuated state between objects. Most of the time you need an object, and some of the time it's simply more convenient not to have to create an instance of an object. A utility class such as the Math class is a perfect example of a stateless class that uses shared members.

In addition to learning about shared fields, properties, and methods, Chapter 11 introduced shared events and overloaded shared members. You probably won't need these idioms on a routine basis, but if and when you do need them, they ...

Get Visual Basic® .NET Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.