O'Reilly logo

Metaprogramming in .NET by Kevin Hazzard and Jason Bock

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 2. Exploring code and metadata with reflection

This chapter covers

  • The need for reflection
  • Reading metadata and executing code
  • Practical uses of reflection

Metaprogramming in .NET can incorporate many different concepts and techniques. Some areas are fairly easy to grasp, others can be quite difficult. The best way to begin is to visit the Reflection API, which has been in .NET since version 1. It provides a fairly simplistic introduction to core concepts of metaprogramming (such as introspection) and it gives you a glimpse into the structure of .NET code.

To start the journey down the .NET metaprogramming road, you’ll go through a couple of problems where reflection helps solve the issue. You’ll walk through examples that demonstrate ...

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