I have never suspected that Microsoft had this built-in, but it appears to be the case. Code generator called T4 , which targets both C# or VB.NET, is built into your copy of Visual Studio and is available as you read this article. Basically, all you need is to add a new file to your solution with the extension
.tt