MetaProgramming in .NET

MetaProgramming, .NET, reflection, T4

I just finished reading “Metaprogramming in .NET” by Kevin Hazzard and Jason Bock and I must say it was a really interesting reading.

The book starts with the definition of metaprogramming :

a computer program that writes new computer programs

and begins to explore the available techniques like Reflection ( the ability to inspect your code at runtime and modify the program behaviour based on this information), Reflection.Emit ( the ability to dynamically create types and methods at runtime to improve perfomance), the usage of the Expression class or IL Rewriting.

The contents of this book are too extensive to be described in a post but if you write code that’s a little above the basic I strongly suggest to read it, it will be able to give you some great ideas.

Comments