Geeks With Blogs
Gavin Stevens's Blog the ramblings of another developer.... March 2010 Entries
Escaping Generics with T4 Templates
I've been doing some work with T4 templates lately and ran into an issue which I couldn't find an answer to anywhere. I finally figured it out, so I thought I'd share the solution. I was trying to generate a code class with a T4 template which used generics The end result a method like: public IEnumerator GetEnumerator() { return new TableEnumerator<Table>... } the related section of the T4 template looks like this: public IEnumerator GetEnumerator() { return new TableEnumerator<#=render... ......

Posted On Saturday, March 13, 2010 4:13 PM

Copyright © Gavin Stevens | Powered by: | Join free