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 ...
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.
Read now
Unlock full access