Rules About Classes

The Common Language Specification influences classes’ implementation with basically a few rules. The most rules are related to inheritance as much as for methods. Because inheritance hasn’t been covered yet, (discussed in Chapter 12, “Inheritance,”), the only rule mentioned here is that if a class exposes only shared members, it must have an empty private constructor and must be marked as NotInheritable, as follows:

image

The other rules about classes are described in Chapter 12.

Get Visual Basic® 2010 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.