On a recent episode of .NET Rocks, I heard a quote along the lines of "Is it easier to write the code that writes the code or to write the code yourself?" If you want to generate some code with a tool, then this post is for you.
The T4 has to be the most popular tool that I hear so little about. Like CodeSmith, T4 is a template based code generation engine using ASP-like syntax. The best thing about T4 is that if you have Visual Studio 2008 installed, you already have it. I originally intended to write a brief overview here, but Oleg Sych has already written an *excellent* overview here. I could hardly top that.
Madhavrao has also complied a list of links to MSDN articles related to T4 here.