Debian Codegraph @

examples/prism-t4-cs.html

raw symbols SCIP
1 <h2>Full example</h2>
2 <pre><code>&lt;#@ template hostspecific="false" language="C#" #&gt;
3 &lt;#@ assembly name="System.Core.dll" #&gt;
4 &lt;#@ output extension=".txt" #&gt;
5 &lt;#
6 using System.Collections.Generic;
7
8 var numbers = new List&lt;int&gt; { 0, 1, 2, 3, 4, 5, 6, /* 7, */ 8, 9, 10 };
9
10 foreach (var i in numbers)
11 {
12 #&gt;
13 The square of &lt;#= i #&gt; is &lt;#= i * i #&gt;
14 &lt;#
15 }
16 #&gt;</code></pre>