Chapter 15. Attributes

Declarations often have modifiers, such as Public or Overridable or ReadOnly, attached to them. These modifiers give the compiler and the .NET Framework extra information about the declaration, such as its accessibility, whether it can be overridden, and whether its value can be changed.

Modifiers have two problems, however. One is that modifiers have to be a part of the language—that is, the compiler has to understand them specially, and they cannot be used in programs to name things (unless they are escaped, of course). This is a problem because the .NET Framework has many places where modifiers are desirable to change the Framework's runtime behavior, but it would be a large burden on the language to define new modifiers ...

Get Visual Basic .NET Programming Language, The 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.