O'Reilly logo

C# for Java Developers by Adam Freeman, Allen Jones

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

Attributes

Attributes are a .NET feature with no direct Java equivalent. For a Java developer new to C#, attributes may well be one of the hardest language features to appreciate. However, knowledge of attributes is essential to use the .NET Framework for anything but the most trivial programs.

Attributes are a generic mechanism for associating declarative information (metadata) with program elements. This metadata is contained in the compiled assembly, allowing programs to retrieve it through reflection at run time. Other programs, particularly the common language runtime (CLR), use this information to determine how they should interact with and manage program elements.

There are many predefined attributes in the .NET class libraries, but the power ...

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