17 lines
426 B
HTML
17 lines
426 B
HTML
<h2>Full example</h2>
|
|
<pre><code><#@ template hostspecific="false" language="C#" #>
|
|
<#@ assembly name="System.Core.dll" #>
|
|
<#@ output extension=".txt" #>
|
|
<#
|
|
using System.Collections.Generic;
|
|
|
|
var numbers = new List<int> { 0, 1, 2, 3, 4, 5, 6, /* 7, */ 8, 9, 10 };
|
|
|
|
foreach (var i in numbers)
|
|
{
|
|
#>
|
|
The square of <#= i #> is <#= i * i #>
|
|
<#
|
|
}
|
|
#></code></pre>
|