O'Reilly logo

A Programmer's Guide to C# 5.0, 4th Edition by Nick Wienholt, Eric Gunnerson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 21

image

Attributes

In most programming languages, some information is expressed through declaration, and other information is expressed through code. For example, in the following class member declaration

public int Test;

the compiler and runtime will reserve space for an integer variable and set its accessibility so that it is visible everywhere. This is an example of declarative information; it’s nice because of the economy of expression and because the compiler handles the details for you.

Typically, the types of declarative information that can be used are predefined by the language designer and can’t be extended by users of the language. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required