Code generation in Visual Studio
By andre
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
, and that’s it, besides from actually writing the code for the template. Read more about it in the article Visual Studio .NET Macros for quick insertion of C# Conditional and Iteration Statements .