Chapter 10. Managing the .NET Compiler

This chapter covers

  • The evolution of the compilers
  • Using the Roslyn API to generate code

By now, we hope you’ve seen that metaprogramming in .NET isn’t only possible, it’s something you should always consider using whenever you create new applications. Metaprogramming requires more care and thought than “normal” .NET development, but the payoff comes with succinct, reusable, dynamic pieces of code. One recurring theme of this book is the use of frameworks to support these techniques—frameworks that provide you with a lot of power, but don’t come with an installation of .NET. With Project Roslyn—a framework from Microsoft that allows you to compile your C# or VB code with a managed API—that’s going to ...

Get Metaprogramming in .NET now with O’Reilly online learning.

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