Twin Cities Code Camp


Due to the Covid-19 pandemic, Twin Cities Code Camp has been postponed until April 2021.

Aaron Erickson

Self-Writing Programs - Using Expressions in C# to Write Code that Writes Code

by Aaron Erickson

While most of us were looking at new features like Linq when C# 3.0 and VB9 came out, behind the scenes, a much more interesting and powerful feature snuck in - the ability to write programs that literally write themselves! In this session, we explore how to write programs that write themselves using the classes in the System.Linq.Expressions namespace. These classes allow you to evaluate code at runtime and even write new code at runtime - without having to resort to IL generation (why should Lisp hackers get all the fun?). You will learn how to use the classes in the namespace, how they work together, as well as some examples of how such things can be useful in ordinary line of business applications.

About the Author

Aaron Erickson is the Technical Solution Specialist for the Magenic Chicago office. Named a Microsoft MVP in 2007, he has written and spoken extensivley about LINQ to Objects, Agile Software Development, and