Chapter 23. Attributes and Reflection

After completing this chapter, you will be able to:

  • Describe what attributes are.

  • Use attributes to add metadata to managed types.

  • Create your own attribute types.

  • Access attribute metadata from code.

This chapter introduces metadata and attributes and shows you how to start defining and manipulating metadata for your own .NET types.

Metadata and attributes

The concept of metadata is central to the way the Microsoft .NET Framework works, so to be an effective .NET programmer, you need to know what it is and how to work with it. Metadata is data attached to .NET data types that carries information about those types (in a broader sense, it is data that describes data). A lot of metadata contains information that can’t ...

Get Microsoft Visual C++/CLI Step by Step now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.